mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
new testcase
llvm-svn: 38741
This commit is contained in:
parent
4505e89d0f
commit
e11dd370ec
7
clang/test/Preprocessor/macro_paste_hashhash.c
Normal file
7
clang/test/Preprocessor/macro_paste_hashhash.c
Normal 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);
|
||||
|
9
clang/test/Preprocessor/macro_rescan.c
Normal file
9
clang/test/Preprocessor/macro_rescan.c
Normal 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); */
|
||||
|
Loading…
Reference in New Issue
Block a user