2013-01-29 01:31:40 +08:00
|
|
|
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
|
2006-07-15 14:53:24 +08:00
|
|
|
|
|
|
|
#define A(b) -#b , - #b , -# b , - # b
|
|
|
|
A()
|
2013-01-29 01:31:40 +08:00
|
|
|
|
|
|
|
// CHECK: {{^}}-"" , - "" , -"" , - ""{{$}}
|
|
|
|
|
|
|
|
|
|
|
|
#define t(x) #x
|
|
|
|
t(a
|
|
|
|
c)
|
|
|
|
|
|
|
|
// CHECK: {{^}}"a c"{{$}}
|
|
|
|
|
2016-01-15 11:24:18 +08:00
|
|
|
#define str(x) #x
|
|
|
|
#define f(x) str(-x)
|
|
|
|
f(
|
|
|
|
1)
|
|
|
|
|
|
|
|
// CHECK: {{^}}"-1"
|
2017-05-05 05:31:17 +08: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"
|