dump_macros.c revision 4fcfde4d5c8f25e40720972a5543d538a0dcb220
1// RUN: clang-cc -E -dM %s -o %t 2 3// Space even without expansion tokens 4// RUN: grep "#define A(x) " %t 5#define A(x) 6 7// Space before expansion list. 8// RUN: grep "#define B(x,y) x y" %t 9#define B(x,y)x y 10 11// No space in expansion list. 12// RUN: grep "#define C(x,y) x y" %t 13#define C(x, y) x y 14 15// No paste avoidance. 16// RUN: grep "#define X() .." %t 17#define X() .. 18 19// Simple test. 20// RUN: grep "#define Y ." %t 21// RUN: grep "#define Z X()Y" %t 22#define Y . 23#define Z X()Y 24 25// gcc prints macros at end of translation unit, so last one wins. 26// RUN: grep "#define foo 2" %t 27// RUN: not grep "#define foo 1" %t 28#define foo 1 29#undef foo 30#define foo 2 31 32