Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 class C { };
      3 
      4 C c;
      5 
      6 void D(int);
      7 
      8 class D {};
      9 
     10 void foo()
     11 {
     12   D(5);
     13   class D d;
     14 }
     15 
     16 class D; // expected-note {{previous use is here}}
     17 
     18 enum D; // expected-error {{use of 'D' with tag type that does not match previous declaration}}
     19 
     20 class A * A;
     21 
     22 class A * a2;
     23 
     24 void bar()
     25 {
     26   A = 0;
     27 }
     28 
     29 void C(int);
     30 
     31 void bar2()
     32 {
     33   C(17);
     34 }
     35 
     36 extern int B;
     37 class B;
     38 class B {};
     39 int B;
     40 
     41 enum E { e1_val };
     42 E e1;
     43 
     44 void E(int);
     45 
     46 void bar3() {
     47   E(17);
     48 }
     49 
     50 enum E e2;
     51 
     52 enum E2 { E2 };
     53