38 lines · cpp
1// RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s2// RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck --check-prefix=CHECK-C %s3 4// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A"5// CHECK-NOT: DIFlagFwdDecl6// CHECK-SAME: ){{$}}7class A {8public:9 int z;10};11 12A *foo (A* x) {13 A *a = new A(*x);14 return a;15}16 17// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B"18// CHECK-SAME: flags: DIFlagFwdDecl19 20class B {21public:22 int y;23};24 25extern int bar(B *b);26int baz(B *b) {27 return bar(b);28}29 30 31// CHECK-C: !DICompositeType(tag: DW_TAG_structure_type, name: "C"32// CHECK-C-SAME: flags: DIFlagFwdDecl33 34struct C {35};36 37C (*x)(C);38