diff options
Diffstat (limited to 'test/CodeGenCXX/pr18661.cpp')
-rw-r--r-- | test/CodeGenCXX/pr18661.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGenCXX/pr18661.cpp b/test/CodeGenCXX/pr18661.cpp new file mode 100644 index 0000000000000..235867831e28e --- /dev/null +++ b/test/CodeGenCXX/pr18661.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 %s -triple %itanium_abi_triple -fcxx-exceptions -fms-extensions -emit-llvm -o - | FileCheck %s + +extern "C" { + void f(); + + // In MS mode we don't validate the exception specification. + void f() throw() { + } +} + +// PR18661: Clang would fail to emit function definition with mismatching +// exception specification, even though it was just treated as a warning. + +// CHECK: define void @f() |