blob: 6becaae72cb865919c05551afb4d70147639557a [file] [log] [blame]
Nuno Lopesfc284482009-12-16 16:59:22 +00001// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o %t-1.ll %s
2// RUN: FileCheck -check-prefix SANE --input-file=%t-1.ll %s
3// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -fno-assume-sane-operator-new -o %t-2.ll %s
4// RUN: FileCheck -check-prefix SANENOT --input-file=%t-2.ll %s
5
6
7class teste {
8 int A;
9 teste() : A(2) {}
10 void* operator new(unsigned) {return ::new teste();}
11};
12
13void f1() {
14 new teste();
15}
16
17// CHECK-SANE: define linkonce_odr noalias i8* @_ZN5testenwEj(
18// CHECK-SANE: declare noalias i8* @_Znwj(
19
20// CHECK-SANENOT: define linkonce_odr i8* @_ZN5testenwEj(
21// CHECK-SANENOT: declare i8* @_Znwj(