mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 11:39:35 +00:00
new testcase
llvm-svn: 38739
This commit is contained in:
parent
b563379d78
commit
85c0e4d780
17
clang/test/Preprocessor/macro_paste_hard.c
Normal file
17
clang/test/Preprocessor/macro_paste_hard.c
Normal 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
|
||||
|
8
clang/test/Preprocessor/macro_rparen_scan.c
Normal file
8
clang/test/Preprocessor/macro_rparen_scan.c
Normal 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 ) ;
|
||||
|
Loading…
Reference in New Issue
Block a user