29 lines · c
1// Test the GNU comma swallowing extension.2// RUN: %clang_cc1 %s -E | FileCheck -strict-whitespace %s3 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// PR388021// CHECK: 4: AA BB22#define X4(...) AA , ## __VA_ARGS__ BB234: X4()24 25// PR794326// CHECK: 5: 127#define X5(x,...) x##,##__VA_ARGS__285: X5(1)29