28 lines · c
1// RUN: %clang_cc1 -E %s | grep 'noexp: foo y'2// RUN: %clang_cc1 -E %s | grep 'expand: abc'3// RUN: %clang_cc1 -E %s | grep 'noexp2: foo nonexp'4// RUN: %clang_cc1 -E %s | grep 'expand2: abc'5 6#define A foo7#define foo() abc8#define X A y9 10// This should not expand to abc, because the foo macro isn't followed by (.11noexp: X12 13 14// This should expand to abc.15#undef X16#define X A ()17expand: X18 19 20// This should be 'foo nonexp'21noexp2: A nonexp22 23// This should expand24expand2: A (25)26 27 28