states: rename unreachable() to is_unreachable()
[smatch.git] / validation / preprocessor / directive-within-macro.c
blob4562078a5f2378af7098e4946bc30d44a2c905f4
1 #define f(x) x
3 f(1
4 #if 1 // OK
6 #elif 2 // OK
8 #else // OK
10 #endif // OK
11 #ifdef f // OK
13 #endif // OK
14 #ifndef f // OK
16 #endif // OK
19 f(1
20 #define x y // KO
24 * check-name: directive-within-macro
25 * check-command: sparse -E $file
27 * check-output-start
29 1 a d 3
30 1 3
31 * check-output-end
33 * check-error-start
34 preprocessor/directive-within-macro.c:20:1: warning: directive in macro's argument list
35 * check-error-end