[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenCXX / dynamic-cast.cpp
blob9467f3e80d8c646f4c5bdc2a2f68b08ab327cfe5
1 // RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s
2 struct A { virtual void f(); };
3 struct B : A { };
5 // CHECK: {{define.*@_Z1fP1A}}
6 // CHECK-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
7 B fail;
8 const B& f(A *a) {
9 try {
10 // CHECK: call i8* @__dynamic_cast
11 // CHECK: br i1
12 // CHECK: invoke void @__cxa_bad_cast() [[NR:#[0-9]+]]
13 dynamic_cast<const B&>(*a);
14 } catch (...) {
15 // CHECK: landingpad { i8*, i32 }
16 // CHECK-NEXT: catch i8* null
18 return fail;
21 // CHECK: declare i8* @__dynamic_cast(i8*, i8*, i8*, i64) [[NUW_RO:#[0-9]+]]
23 // CHECK: attributes [[NUW_RO]] = { nounwind readonly }
24 // CHECK: attributes [[NR]] = { noreturn }