blob: 308700e50d66607050a44b16c90dbaf1258065cb [file] [log] [blame]
Chris Lattner8129edb2009-04-12 22:23:27 +00001// RUN: clang-cc -verify -fsyntax-only %s
2
3int x(*g); // expected-error {{use of undeclared identifier 'g'}}
Chris Lattner46646492009-12-07 01:36:53 +00004
5
6// PR4451 - We should recover well from the typo of '::' as ':' in a2.
7namespace y {
8 struct a { };
9}
10
11y::a a1;
12y:a a2; // expected-error {{unexpected ':' in nested name specifier}}
13y::a a3 = a2;
14
15// Some valid colons:
16void foo() {
17y: // label
18 y::a s;
19
20 int a = 4;
21 a = a ? a : a+1;
22}
23
24struct b : y::a {};
25
26template <typename T>
27class someclass {
28
29 int bar() {
30 T *P;
31 return 1 ? P->x : P->y;
32 }
33};