1 // RUN: %clang_cc1 %s -Eonly -Werror=undef -verify
2 
3 extern int x;
4 
5 #if foo   // expected-error {{'foo' is not defined, evaluates to 0}}
6 #endif
7 
8 // expected-warning@+2 {{use of a '#elifdef' directive is a C2x extension}}
9 #ifdef foo
10 #elifdef foo
11 #endif
12 
13 #if defined(foo)
14 #endif
15 
16 
17 // PR3938
18 // expected-warning@+3 {{use of a '#elifdef' directive is a C2x extension}}
19 #if 0
20 #ifdef D
21 #elifdef D
22 #else 1       // Should not warn due to C99 6.10p4
23 #endif
24 #endif
25 
26 // rdar://9475098
27 #if 0
28 #else 1   // expected-warning {{extra tokens}}
29 #endif
30 
31 // PR6852
32 #if 'somesillylongthing'  // expected-warning {{character constant too long for its type}} \
33                           // expected-warning {{multi-character character constant}}
34 #endif
35