cg.cpp revision bd7c849de9a1647b235597681c3983ba1e8c6c8b
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include %S/ser.h %s -o - | FileCheck %s
2// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-pch -o %t-ser.pch -std=c++0x -x c++ %S/ser.h
3// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include-pch %t-ser.pch %s -o - | FileCheck %s
4
5struct D {
6  ~D() throw();
7};
8struct E {
9  ~E() throw();
10};
11
12void test() {
13  bool b;
14  // CHECK: store i8 1, i8* %b, align 1
15  b = noexcept(0);
16  // CHECK: store i8 0, i8* %b, align 1
17  b = noexcept(throw 0);
18  b = f1();
19  b = f2();
20
21  // CHECK-NOT: call void @_ZN1ED1Ev
22  // CHECK: call void @_ZN1DD1Ev
23  D(), noexcept(E());
24}
25// CHECK: ret i1 true
26// CHECK: ret i1 false
27