xref: /aosp_15_r20/external/clang/test/CodeGenCXX/pr18661.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 %s -triple %itanium_abi_triple -fcxx-exceptions -fms-extensions -emit-llvm -o - | FileCheck %s
2*67e74705SXin Li 
3*67e74705SXin Li extern "C" {
4*67e74705SXin Li   void f();
5*67e74705SXin Li 
6*67e74705SXin Li   // In MS mode we don't validate the exception specification.
f()7*67e74705SXin Li   void f() throw() {
8*67e74705SXin Li   }
9*67e74705SXin Li }
10*67e74705SXin Li 
11*67e74705SXin Li // PR18661: Clang would fail to emit function definition with mismatching
12*67e74705SXin Li // exception specification, even though it was just treated as a warning.
13*67e74705SXin Li 
14*67e74705SXin Li // CHECK: define {{.*}}void @f()
15