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 17 int 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 26 check-output-pattern(1): #define __CHECKER__ 1 27 check-output-contains: #define IJK ijk 28 check-output-contains: #define DEF xyz 29 check-output-contains: #define NYDEF ydef 30 check-output-contains: #define STRING(x) #x 31 check-output-contains: #define CONCAT(x,y) x ## y 32 check-output-contains: #define unlocks(...) annotate(unlock_func(__VA_ARGS__)) 33 check-output-contains: #define apply(x,...) x(__VA_ARGS__) 34 check-output-excludes: int main(int argc, char \\*argv\\[\\]) 35 check-output-excludes: ^\\[^#] 36 */