1// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++14 -fblocks -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s
2struct test
3{
4    int func() { return 1; }
5    int (^block)() = ^{ return func(); };
6};
7
8int main(int argc, const char * argv[]) {
9    test t;
10    return t.block();
11}
12
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]],
19
20
21