1// Test the GNU comma swallowing extension.
2// RUN: %clang_cc1 %s -E | FileCheck -strict-whitespace %s
3
4// CHECK: 1: foo{A, }
5#define X(Y) foo{A, Y}
61: X()
7
8
9// CHECK: 2: fo2{A,}
10#define X2(Y) fo2{A,##Y}
112: X2()
12
13// should eat the comma.
14// CHECK: 3: {foo}
15#define X3(b, ...) {b, ## __VA_ARGS__}
163: X3(foo)
17
18
19
20// PR3880
21// CHECK: 4: AA BB
22#define X4(...)  AA , ## __VA_ARGS__ BB
234: X4()
24
25// PR7943
26// CHECK: 5: 1
27#define X5(x,...) x##,##__VA_ARGS__
285: X5(1)
29