1
2#define ABC abc
3#undef ABC
4
5#define	DEF def
6#undef DEF
7#define DEF xyz
8
9#define NYDEF ydef
10
11#define STRING(x) #x
12#define CONCAT(x,y) x ## y
13
14#define unlocks(...) annotate(unlock_func(__VA_ARGS__))
15#define apply(x,...) x(__VA_ARGS__)
16
17int main(int argc, char *argv[])
18{
19	return 0;
20}
21/*
22 * check-name: dump-macros only -dM
23 * check-command: sparse -E -dM -DIJK=ijk -UNDEF -UNYDEF $file
24 *
25 * check-output-ignore
26check-output-pattern(1): #define __CHECKER__ 1
27check-output-contains: #define IJK ijk
28check-output-contains: #define DEF xyz
29check-output-contains: #define NYDEF ydef
30check-output-contains: #define STRING(x) #x
31check-output-contains: #define CONCAT(x,y) x ## y
32check-output-contains: #define unlocks(...) annotate(unlock_func(__VA_ARGS__))
33check-output-contains: #define apply(x,...) x(__VA_ARGS__)
34check-output-excludes: int main(int argc, char \\*argv\\[\\])
35check-output-excludes: ^\\[^#]
36 */
37