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