blob: 07d92a635e051f79a9bdaf218960a8154685d1f9 (
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
34
|
/* RUN: %clang_cc1 -E -verify %s
*/
/* expected-error@+1 {{macro name missing}} */
#ifdef
#endif
/* expected-error@+1 {{macro name must be an identifier}} */
#ifdef !
#endif
/* expected-error@+1 {{macro name missing}} */
#if defined
#endif
/* PR1936 */
/* expected-error@+2 {{unterminated function-like macro invocation}} expected-error@+2 {{expected value in expression}} expected-note@+1 {{macro 'f' defined here}} */
#define f(x) x
#if f(2
#endif
/* expected-error@+3 {{macro name missing}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C23 extension}} */
#ifdef FOO
#elifdef
#endif
/* expected-error@+3 {{macro name must be an identifier}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C23 extension}} */
#ifdef FOO
#elifdef !
#endif
int x;
|