aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-09-10 21:57:27 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-09-10 21:57:27 +0000
commitbd7c849de9a1647b235597681c3983ba1e8c6c8b (patch)
treeadecdc8b4df9e799699b59b0b4590526d35aab09 /test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
parentb08fab82a68f6c1588ecd12ae2c6399cc5ea662d (diff)
Eli helped me understand how evaluation contexts work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp')
-rw-r--r--test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp b/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
index c567eff8c3..aa2d553542 100644
--- a/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
+++ b/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
@@ -2,14 +2,25 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-pch -o %t-ser.pch -std=c++0x -x c++ %S/ser.h
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include-pch %t-ser.pch %s -o - | FileCheck %s
+struct D {
+ ~D() throw();
+};
+struct E {
+ ~E() throw();
+};
+
void test() {
bool b;
// CHECK: store i8 1, i8* %b, align 1
b = noexcept(0);
// CHECK: store i8 0, i8* %b, align 1
b = noexcept(throw 0);
- // CHECK: ret i1 true
b = f1();
- // CHECK: ret i1 false
b = f2();
+
+ // CHECK-NOT: call void @_ZN1ED1Ev
+ // CHECK: call void @_ZN1DD1Ev
+ D(), noexcept(E());
}
+// CHECK: ret i1 true
+// CHECK: ret i1 false