Home | History | Annotate | Download | only in Inputs
      1 
      2 // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "PR16214",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
      3 struct PR16214 {
      4   int i;
      5 };
      6 
      7 typedef PR16214 bar;
      8 
      9 bar *a;
     10 bar b;
     11 
     12 namespace PR14467 {
     13 // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
     14 struct foo {
     15 };
     16 
     17 foo *bar(foo *a) {
     18   foo *b = new foo(*a);
     19   return b;
     20 }
     21 }
     22 
     23 namespace test1 {
     24 // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
     25 struct foo {
     26 };
     27 
     28 extern int bar(foo *a);
     29 int baz(foo *a) {
     30   return bar(a);
     31 }
     32 }
     33 
     34 namespace test2 {
     35 // FIXME: if we were a bit fancier, we could realize that the 'foo' type is only
     36 // required because of the 'bar' type which is not required at all (or might
     37 // only be required to be declared)
     38 // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
     39 struct foo {
     40 };
     41 
     42 struct bar {
     43   foo f;
     44 };
     45 
     46 void func() {
     47   foo *f;
     48 }
     49 }
     50