28 lines · cpp
1// REQUIRES: x86-registered-target2// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -emit-llvm -std=c++11 -include %S/ser.h %s -o - | FileCheck %s3// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -emit-pch -o %t-ser.pch -std=c++11 -x c++ %S/ser.h4// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -emit-llvm -std=c++11 -include-pch %t-ser.pch %s -o - | FileCheck %s5 6struct D {7 ~D() throw();8};9struct E {10 ~E() throw();11};12 13void test() {14 bool b;15 // CHECK: store i8 116 b = noexcept(0);17 // CHECK: store i8 018 b = noexcept(throw 0);19 b = f1();20 b = f2();21 22 // CHECK-NOT: call void @_ZN1ED1Ev23 // CHECK: call void @_ZN1DD1Ev24 D(), noexcept(E());25}26// CHECK: ret i1 true27// CHECK: ret i1 false28