[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Preprocessor / ifdef-recover.c
blob33a53003bc2bc31c45119ebb5ed32b0509631e34
1 /* RUN: %clang_cc1 -E -verify %s
2 */
4 /* expected-error@+1 {{macro name missing}} */
5 #ifdef
6 #endif
8 /* expected-error@+1 {{macro name must be an identifier}} */
9 #ifdef !
10 #endif
12 /* expected-error@+1 {{macro name missing}} */
13 #if defined
14 #endif
16 /* PR1936 */
17 /* expected-error@+2 {{unterminated function-like macro invocation}} expected-error@+2 {{expected value in expression}} expected-note@+1 {{macro 'f' defined here}} */
18 #define f(x) x
19 #if f(2
20 #endif
22 /* expected-error@+3 {{macro name missing}} */
23 /* expected-warning@+2 {{use of a '#elifdef' directive is a C2x extension}} */
24 #ifdef FOO
25 #elifdef
26 #endif
28 /* expected-error@+3 {{macro name must be an identifier}} */
29 /* expected-warning@+2 {{use of a '#elifdef' directive is a C2x extension}} */
30 #ifdef FOO
31 #elifdef !
32 #endif
34 int x;