diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-07 03:40:37 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-07 03:40:37 +0000 |
commit | e245aa2a93f78bbb4c450640f1279de150aaaaa6 (patch) | |
tree | 3497250042e809142f917e2b9e9e51eb3199951d /clang/test/Preprocessor/macro_paste_hashhash.c | |
parent | 41fb2d95a3921948571ee58ce8d0fa905bb32394 (diff) | |
download | bcm5719-llvm-e245aa2a93f78bbb4c450640f1279de150aaaaa6.tar.gz bcm5719-llvm-e245aa2a93f78bbb4c450640f1279de150aaaaa6.zip |
When expanding macro arguments, treat '##' coming from an argument as a normal token.
e.g.
#define M(x) A x B
M(##) // should expand to 'A ## B', not 'AB'
llvm-svn: 134588
Diffstat (limited to 'clang/test/Preprocessor/macro_paste_hashhash.c')
-rw-r--r-- | clang/test/Preprocessor/macro_paste_hashhash.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/Preprocessor/macro_paste_hashhash.c b/clang/test/Preprocessor/macro_paste_hashhash.c index e7993cc0a35..f4b03bef2e1 100644 --- a/clang/test/Preprocessor/macro_paste_hashhash.c +++ b/clang/test/Preprocessor/macro_paste_hashhash.c @@ -1,7 +1,11 @@ -// RUN: %clang_cc1 -E %s | grep '^"x ## y";$' +// RUN: %clang_cc1 -E %s | FileCheck %s #define hash_hash # ## # #define mkstr(a) # a #define in_between(a) mkstr(a) #define join(c, d) in_between(c hash_hash d) +// CHECK: "x ## y"; join(x, y); +#define FOO(x) A x B +// CHECK: A ## B; +FOO(##); |