Argyrios Kyrtzidis | e245aa2 | 2011-07-07 03:40:37 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -E %s | FileCheck %s |
Chris Lattner | e11dd37 | 2006-07-19 08:01:28 +0000 | [diff] [blame] | 2 | #define hash_hash # ## # |
| 3 | #define mkstr(a) # a |
| 4 | #define in_between(a) mkstr(a) |
| 5 | #define join(c, d) in_between(c hash_hash d) |
Argyrios Kyrtzidis | e245aa2 | 2011-07-07 03:40:37 +0000 | [diff] [blame] | 6 | // CHECK: "x ## y"; |
Chris Lattner | e11dd37 | 2006-07-19 08:01:28 +0000 | [diff] [blame] | 7 | join(x, y); |
| 8 | |
Argyrios Kyrtzidis | e245aa2 | 2011-07-07 03:40:37 +0000 | [diff] [blame] | 9 | #define FOO(x) A x B |
| 10 | // CHECK: A ## B; |
| 11 | FOO(##); |