2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -E %s | grep 'noexp: foo y'
|
|
|
|
// RUN: %clang_cc1 -E %s | grep 'expand: abc'
|
|
|
|
// RUN: %clang_cc1 -E %s | grep 'noexp2: foo nonexp'
|
|
|
|
// RUN: %clang_cc1 -E %s | grep 'expand2: abc'
|
2006-07-11 12:00:23 +08:00
|
|
|
|
|
|
|
#define A foo
|
|
|
|
#define foo() abc
|
|
|
|
#define X A y
|
|
|
|
|
|
|
|
// This should not expand to abc, because the foo macro isn't followed by (.
|
|
|
|
noexp: X
|
|
|
|
|
|
|
|
|
|
|
|
// This should expand to abc.
|
2006-07-11 13:03:43 +08:00
|
|
|
#undef X
|
2006-07-11 12:00:23 +08:00
|
|
|
#define X A ()
|
|
|
|
expand: X
|
|
|
|
|
2006-07-11 13:03:43 +08:00
|
|
|
|
|
|
|
// This should be 'foo nonexp'
|
|
|
|
noexp2: A nonexp
|
|
|
|
|
|
|
|
// This should expand
|
|
|
|
expand2: A (
|
|
|
|
)
|
|
|
|
|
|
|
|
|