new testcase

llvm-svn: 38739
This commit is contained in:
Chris Lattner 2006-07-19 06:40:07 +00:00
parent b563379d78
commit 85c0e4d780
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,17 @@
; RUN: clang -E %s | grep '1: aaab 2' &&
; RUN: clang -E %s | grep '2: 2 baaa' &&
; RUN: clang -E %s | grep '3: 2 xx'
#define a(n) aaa ## n
#define b 2
1: a(b b) // aaab 2 2 gets expanded, not b.
#undef a
#undef b
#define a(n) n ## aaa
#define b 2
2: a(b b) // 2 baaa 2 gets expanded, not b.
#define baaa xx
3: a(b b) // 2 xx

View File

@ -0,0 +1,8 @@
// RUN: clang -E %s | grep '^3 ;$'
/* Right paren scanning, hard case. Should expand to 3. */
#define i(x) 3
#define a i(yz
#define b )
a b ) ;