Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / cxx03-aligned-allocation-unscoped-enum.cpp
blob0a918a145e1f0b71b48970aa2a266d01a3471850
1 // RUN: %clang_cc1 -std=c++03 -triple x86_64-pc-linux-gnu %s \
2 // RUN: -faligned-allocation -emit-llvm -o - -Wno-c++11-extensions | FileCheck %s
4 // Ensure Clang doesn't confuse std::align_val_t with the sized deallocation
5 // parameter when the enum type is unscoped. Libc++ does this in C++03 in order
6 // to support aligned allocation in that dialect.
8 using size_t = __decltype(sizeof(0));
10 namespace std {
11 enum align_val_t : size_t {};
13 _Static_assert(__is_same(__underlying_type(std::align_val_t), size_t), "");
15 // CHECK-LABEL: define{{.*}} void @_Z1fPi(
16 void f(int *p) {
17 // CHECK-NOT: call void @_ZdlPvSt11align_val_t(
18 // CHECK: call void @_ZdlPv(
19 // CHECK: ret void
20 delete p;