[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGenObjCXX / debug-info-block-capture-this.mm
blob9464222b543b580d02fb442434b6cfb200b2404f
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++14 -fblocks -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s
2 struct test
4     int func() { return 1; }
5     int (^block)() = ^{ return func(); };
6 };
8 int main(int argc, const char * argv[]) {
9     test t;
10     return t.block();
13 // CHECK: ![[TESTCT:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "test"
14 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_literal_1",
15 // CHECK-SAME:             elements: ![[ELEMS:.*]])
16 // CHECK: ![[ELEMS]] = !{{{.*}}, ![[THIS:[0-9]+]]}
17 // CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_member, name: "this",
18 // CHECK-SAME:                       baseType: ![[TESTCT]],