xref: /minix3/external/bsd/llvm/dist/clang/test/Preprocessor/macro_space.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
2f4a2713aSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc #define FOO1()
4*0a6a1f1dSLionel Sambuc #define FOO2(x)x
5*0a6a1f1dSLionel Sambuc #define FOO3(x) x
6*0a6a1f1dSLionel Sambuc #define FOO4(x)x x
7*0a6a1f1dSLionel Sambuc #define FOO5(x) x x
8*0a6a1f1dSLionel Sambuc #define FOO6(x) [x]
9*0a6a1f1dSLionel Sambuc #define FOO7(x) [ x]
10*0a6a1f1dSLionel Sambuc #define FOO8(x) [x ]
11f4a2713aSLionel Sambuc 
12*0a6a1f1dSLionel Sambuc #define TEST(FOO,x) FOO <FOO()> < FOO()> <FOO ()> <FOO( )> <FOO() > <FOO()x> <FOO() x> < FOO()x>
13*0a6a1f1dSLionel Sambuc 
14*0a6a1f1dSLionel Sambuc TEST(FOO1,)
15*0a6a1f1dSLionel Sambuc // CHECK: FOO1 <> < > <> <> < > <> < > < >
16*0a6a1f1dSLionel Sambuc 
17*0a6a1f1dSLionel Sambuc TEST(FOO2,)
18*0a6a1f1dSLionel Sambuc // CHECK: FOO2 <> < > <> <> < > <> < > < >
19*0a6a1f1dSLionel Sambuc 
20*0a6a1f1dSLionel Sambuc TEST(FOO3,)
21*0a6a1f1dSLionel Sambuc // CHECK: FOO3 <> < > <> <> < > <> < > < >
22*0a6a1f1dSLionel Sambuc 
23*0a6a1f1dSLionel Sambuc TEST(FOO4,)
24*0a6a1f1dSLionel Sambuc // CHECK: FOO4 < > < > < > < > < > < > < > < >
25*0a6a1f1dSLionel Sambuc 
26*0a6a1f1dSLionel Sambuc TEST(FOO5,)
27*0a6a1f1dSLionel Sambuc // CHECK: FOO5 < > < > < > < > < > < > < > < >
28*0a6a1f1dSLionel Sambuc 
29*0a6a1f1dSLionel Sambuc TEST(FOO6,)
30*0a6a1f1dSLionel Sambuc // CHECK: FOO6 <[]> < []> <[]> <[]> <[] > <[]> <[] > < []>
31*0a6a1f1dSLionel Sambuc 
32*0a6a1f1dSLionel Sambuc TEST(FOO7,)
33*0a6a1f1dSLionel Sambuc // CHECK: FOO7 <[ ]> < [ ]> <[ ]> <[ ]> <[ ] > <[ ]> <[ ] > < [ ]>
34*0a6a1f1dSLionel Sambuc 
35*0a6a1f1dSLionel Sambuc TEST(FOO8,)
36*0a6a1f1dSLionel Sambuc // CHECK: FOO8 <[ ]> < [ ]> <[ ]> <[ ]> <[ ] > <[ ]> <[ ] > < [ ]>
37