]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Preprocessor/if_warning.c
Import Clang, at r72732.
[FreeBSD/FreeBSD.git] / test / Preprocessor / if_warning.c
1 // RUN: clang-cc %s -Eonly -Werror=undef -verify &&
2 // RUN: clang-cc %s -Eonly -Werror-undef -verify
3
4 extern int x;
5
6 #if foo   // expected-error {{'foo' is not defined, evaluates to 0}}
7 #endif
8
9 #ifdef foo
10 #endif
11
12 #if defined(foo)
13 #endif
14
15
16 // PR3938
17 #if 0
18 #ifdef D
19 #else 1       // Should not warn due to C99 6.10p4
20 #endif
21 #endif