new testcase

llvm-svn: 38741
This commit is contained in:
Chris Lattner 2006-07-19 08:01:28 +00:00
parent 4505e89d0f
commit e11dd370ec
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,7 @@
// RUN: clang -E %s | grep '^"x ## y";$'
#define hash_hash # ## #
#define mkstr(a) # a
#define in_between(a) mkstr(a)
#define join(c, d) in_between(c hash_hash d)
join(x, y);

View File

@ -0,0 +1,9 @@
// RUN: clang -E %s | grep 'ei_1 = (17+1);' &&
// RUN: clang -E %s | grep 'ei_2 = (M1)(17);'
#define M1(a) (a+1)
#define M2(b) b
int ei_1 = M2(M1)(17); /* becomes int ei_1 = (17+1); */
int ei_2 = (M2(M1))(17); /* becomes int ei_2 = (M1)(17); */