150
|
1 // RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
|
236
|
2 // RUN: %clang_cc1 -E -P -fminimize-whitespace %s | FileCheck --strict-whitespace %s --check-prefix=MINWS
|
150
|
3
|
|
4 #define A(b) -#b , - #b , -# b , - # b
|
|
5 A()
|
|
6
|
|
7 // CHECK: {{^}}-"" , - "" , -"" , - ""{{$}}
|
236
|
8 // MINWS: {{^}}-"",-"",-"",-""
|
150
|
9
|
|
10 #define t(x) #x
|
|
11 t(a
|
|
12 c)
|
|
13
|
|
14 // CHECK: {{^}}"a c"{{$}}
|
236
|
15 // MINWS-SAME: "a c"
|
150
|
16
|
|
17 #define str(x) #x
|
|
18 #define f(x) str(-x)
|
|
19 f(
|
|
20 1)
|
|
21
|
|
22 // CHECK: {{^}}"-1"
|
236
|
23 // MINWS-SAME: "-1"
|
150
|
24
|
|
25 #define paste(a,b) str(a<b##ld)
|
|
26 paste(hello1, wor)
|
|
27 paste(hello2,
|
|
28 wor)
|
|
29 paste(hello3,
|
|
30 wor)
|
|
31
|
|
32 // CHECK: {{^}}"hello1<world"
|
|
33 // CHECK: {{^}}"hello2<world"
|
|
34 // CHECK: {{^}}"hello3<world"
|
236
|
35 // MINWS-SAME: {{^}}"hello1<world""hello2<world""hello3<world"{{$}}
|