]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGenObjCXX/nested-ehlocation.mm
Vendor import of clang trunk r238337:
[FreeBSD/FreeBSD.git] / test / CodeGenObjCXX / nested-ehlocation.mm
1 // RUN: %clang_cc1  -triple x86_64-apple-macosx -emit-llvm -g -stdlib=libc++ -fblocks -fexceptions -x objective-c++ -o - %s | FileCheck %s
2
3 // Verify that all invoke instructions have a debug location.
4 // Literally: There are no unwind lines that don't end with ", (!dbg 123)".
5 // CHECK-NOT: {{to label %.* unwind label [^,]+$}}
6
7 void block(void (^)(void));
8 extern void foo();
9 struct A {
10   ~A(void) { foo(); }
11   void bar() const {}
12 };
13 void baz(void const *const) {}
14 struct B : A {};
15 void test() {
16   A a;
17   B b;
18   block(^(void) {
19     baz(&b);
20     block(^() {
21       a.bar();
22     });
23   });
24 }