diff options
Diffstat (limited to 'test/CodeGenCXX/cxx11-exception-spec.cpp')
-rw-r--r-- | test/CodeGenCXX/cxx11-exception-spec.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/cxx11-exception-spec.cpp b/test/CodeGenCXX/cxx11-exception-spec.cpp new file mode 100644 index 0000000000..461af78eae --- /dev/null +++ b/test/CodeGenCXX/cxx11-exception-spec.cpp @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++11 -verify -emit-llvm %s -o - | FileCheck %s + +template<typename T> void f() noexcept(sizeof(T) == 4); + +void g() { + // CHECK: declare void @_Z1fIiEvv() nounwind + f<int>(); + // CHECK: declare void @_Z1fIA2_iEvv() + f<int[2]>(); + // CHECK: declare void @_Z1fIfEvv() nounwind + void (*f1)() = &f<float>; + // CHECK: declare void @_Z1fIdEvv() + void (*f2)() = &f<double>; + // CHECK: declare void @_Z1fIA4_cEvv() nounwind + (void)&f<char[4]>; + // CHECK: declare void @_Z1fIcEvv() + (void)&f<char>; +} |