blob: e837bd9f43343a01bb80eaa112e761bc3be4bbab [file] [log] [blame]
Richard Trieu919b9552012-11-02 01:08:58 +00001// 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
6struct S { static int a,b,c;};
7int S::(a); // expected-error{{unexpected parentheses after '::'}}
8int S::(b; // expected-error{{unexpected parentheses after '::'}}
9int S::c;
10int S::(*d); // expected-error{{unexpected parentheses after '::'}}
11int S::(*e; // expected-error{{unexpected parentheses after '::'}}
12int S::*f;
13int g = S::(a); // expected-error{{unexpected parentheses after '::'}}
14int h = S::(b; // expected-error{{unexpected parentheses after '::'}}
15int i = S::c;
16
17void foo() {
18 int a;
19 a = ::(g); // expected-error{{unexpected parentheses after '::'}}
20 a = ::(h; // expected-error{{unexpected parentheses after '::'}}
21 a = ::i;
22}