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