blob: cbc7386cd09b319884965c9b0ba6c9caf8ce74c6 [file] [log] [blame]
Dmitri Gribenkob5bf9b62013-01-28 17:31:40 +00001// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
Chris Lattner6ae37df2006-07-15 06:53:24 +00002
3#define A(b) -#b , - #b , -# b , - # b
4A()
Dmitri Gribenkob5bf9b62013-01-28 17:31:40 +00005
6// CHECK: {{^}}-"" , - "" , -"" , - ""{{$}}
7
8
9#define t(x) #x
10t(a
11c)
12
13// CHECK: {{^}}"a c"{{$}}
14
Richard Smith4b838862016-01-15 03:24:18 +000015#define str(x) #x
16#define f(x) str(-x)
17f(
18 1)
19
20// CHECK: {{^}}"-1"
James Y Knight7f319012017-05-04 21:31:17 +000021
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"