Clang Project

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