2013-04-08 14:45:10 -04:00
|
|
|
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
|
2009-06-02 13:58:47 -04:00
|
|
|
|
|
|
|
|
#define A(b) -#b , - #b , -# b , - # b
|
|
|
|
|
A()
|
2013-04-08 14:45:10 -04:00
|
|
|
|
|
|
|
|
// CHECK: {{^}}-"" , - "" , -"" , - ""{{$}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define t(x) #x
|
|
|
|
|
t(a
|
|
|
|
|
c)
|
|
|
|
|
|
|
|
|
|
// CHECK: {{^}}"a c"{{$}}
|
|
|
|
|
|
2016-07-23 16:44:14 -04:00
|
|
|
#define str(x) #x
|
|
|
|
|
#define f(x) str(-x)
|
|
|
|
|
f(
|
|
|
|
|
1)
|
|
|
|
|
|
|
|
|
|
// CHECK: {{^}}"-1"
|
2017-05-08 13:13:11 -04:00
|
|
|
|
|
|
|
|
#define paste(a,b) str(a<b##ld)
|
|
|
|
|
paste(hello1, wor)
|
|
|
|
|
paste(hello2,
|
|
|
|
|
wor)
|
|
|
|
|
paste(hello3,
|
|
|
|
|
wor)
|
|
|
|
|
|
|
|
|
|
// CHECK: {{^}}"hello1<world"
|
|
|
|
|
// CHECK: {{^}}"hello2<world"
|
|
|
|
|
// CHECK: {{^}}"hello3<world"
|