blob: df7da797f050b1f9edee18499aa051f4c869372c (
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
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
//
// This file contains typo correction tests which hit different code paths in C
// than in C++ and may exhibit different behavior as a result.
__typeof__(struct F*) var[invalid]; // expected-error-re {{use of undeclared identifier 'invalid'{{$}}}}
void PR21656() {
float x;
x = (float)arst; // expected-error-re {{use of undeclared identifier 'arst'{{$}}}}
}
a = b ? : 0; // expected-warning {{type specifier missing, defaults to 'int'}} \
// expected-error {{use of undeclared identifier 'b'}}
struct ContainerStuct {
enum { SOME_ENUM }; // expected-note {{'SOME_ENUM' declared here}}
};
void func(int arg) {
switch (arg) {
case SOME_ENUM_: // expected-error {{use of undeclared identifier 'SOME_ENUM_'; did you mean 'SOME_ENUM'}}
;
}
}
|