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