diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
commit | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch) | |
tree | c72b9241553fc9966179aba84f90f17bfa9235c3 /test/CodeGenCXX/implicit-exception-spec.cpp | |
parent | b52119637f743680a99710ce5fdb6646da2772af (diff) |
Diffstat (limited to 'test/CodeGenCXX/implicit-exception-spec.cpp')
-rw-r--r-- | test/CodeGenCXX/implicit-exception-spec.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGenCXX/implicit-exception-spec.cpp b/test/CodeGenCXX/implicit-exception-spec.cpp new file mode 100644 index 0000000000000..cf363bd685add --- /dev/null +++ b/test/CodeGenCXX/implicit-exception-spec.cpp @@ -0,0 +1,22 @@ +// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -emit-llvm -std=c++11 -o - -fcxx-exceptions -fexceptions | FileCheck -check-prefix=CHECK %s + +struct A { + A(); + A(const A&); + A(A&&); +}; +struct B : virtual A { + virtual void f() = 0; +}; +struct C : B { + void f(); +}; + +// CHECK-DAG: define {{.*}} @_ZN1BC2Ev({{.*}} #[[NOUNWIND:[0-9]*]] +C c1; +// CHECK-DAG: define {{.*}} @_ZN1BC2ERKS_({{.*}} #[[NOUNWIND]] +C c2(c1); +// CHECK-DAG: define {{.*}} @_ZN1BC2EOS_({{.*}} #[[NOUNWIND]] +C c3(static_cast<C&&>(c1)); + +// CHECK-DAG: #[[NOUNWIND]] = {{{.*}} nounwind |