1 // RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s
2 // RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s
3 // RUN: %clang_cc1 -std=c++14 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s
4 // RUN: %clang_cc1 -std=c++1z %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s
8 // FIXME: __SIZE_TYPE__ expands to 'long long' on some targets.
9 __extension__
typedef __SIZE_TYPE__
size_t;
11 void *operator new(size_t, void *);
12 void *operator new[](size_t, void *);
16 // The reserved placement allocation functions get inlined
17 // even if we can't see their definitions. They do not
18 // perform a null check.
20 // CHECK-LABEL: define {{.*}} @_Z1fPv(
22 // CHECK-NOT: icmp{{.*}} null
24 // CHECK: call void @_ZN1XC1Ev(
26 X
*f(void *p
) { return new (p
) X
; }
28 // CHECK-LABEL: define {{.*}} @_Z1gPv(
30 // CHECK-NOT: icmp{{.*}} null
32 // CHECK: call void @_ZN1XC1Ev(
35 X
*g(void *p
) { return new (p
) X
[5]; }