annotate clang/test/Preprocessor/stringize_space.c @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
2 // RUN: %clang_cc1 -E -P -fminimize-whitespace %s | FileCheck --strict-whitespace %s --check-prefix=MINWS
150
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 #define A(b) -#b , - #b , -# b , - # b
anatofuz
parents:
diff changeset
5 A()
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 // CHECK: {{^}}-"" , - "" , -"" , - ""{{$}}
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
8 // MINWS: {{^}}-"",-"",-"",-""
150
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 #define t(x) #x
anatofuz
parents:
diff changeset
11 t(a
anatofuz
parents:
diff changeset
12 c)
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 // CHECK: {{^}}"a c"{{$}}
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
15 // MINWS-SAME: "a c"
150
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 #define str(x) #x
anatofuz
parents:
diff changeset
18 #define f(x) str(-x)
anatofuz
parents:
diff changeset
19 f(
anatofuz
parents:
diff changeset
20 1)
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 // CHECK: {{^}}"-1"
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
23 // MINWS-SAME: "-1"
150
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 #define paste(a,b) str(a<b##ld)
anatofuz
parents:
diff changeset
26 paste(hello1, wor)
anatofuz
parents:
diff changeset
27 paste(hello2,
anatofuz
parents:
diff changeset
28 wor)
anatofuz
parents:
diff changeset
29 paste(hello3,
anatofuz
parents:
diff changeset
30 wor)
anatofuz
parents:
diff changeset
31
anatofuz
parents:
diff changeset
32 // CHECK: {{^}}"hello1<world"
anatofuz
parents:
diff changeset
33 // CHECK: {{^}}"hello2<world"
anatofuz
parents:
diff changeset
34 // CHECK: {{^}}"hello3<world"
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
35 // MINWS-SAME: {{^}}"hello1<world""hello2<world""hello3<world"{{$}}