Home | History | Annotate | Download | only in Parser
      1 // RUN: %clang_cc1 %s -fsyntax-only -verify
      2 // RUN: cp %s %t
      3 // RUN: not %clang_cc1 -x c++ -fixit %t
      4 // RUN: %clang_cc1 -x c++ %t
      5 
      6 struct S { static int a,b,c;};
      7 int S::(a);  // expected-error{{unexpected parenthesis after '::'}}
      8 int S::(b;  // expected-error{{unexpected parenthesis after '::'}}
      9 int S::c;
     10 int S::(*d);  // expected-error{{unexpected parenthesis after '::'}}
     11 int S::(*e;  // expected-error{{unexpected parenthesis after '::'}}
     12 int S::*f;
     13 int g = S::(a);  // expected-error{{unexpected parenthesis after '::'}}
     14 int h = S::(b;  // expected-error{{unexpected parenthesis after '::'}}
     15 int i = S::c;
     16 
     17 void foo() {
     18   int a;
     19   a = ::(g);  // expected-error{{unexpected parenthesis after '::'}}
     20   a = ::(h;  // expected-error{{unexpected parenthesis after '::'}}
     21   a = ::i;
     22 }
     23