[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Preprocessor / macro_fn_comma_swallow.c
blob726a889f55e5bebbcc44aaf6b245c684fefdaedf
1 // Test the GNU comma swallowing extension.
2 // RUN: %clang_cc1 %s -E | FileCheck -strict-whitespace %s
4 // CHECK: 1: foo{A, }
5 #define X(Y) foo{A, Y}
6 1: X()
9 // CHECK: 2: fo2{A,}
10 #define X2(Y) fo2{A,##Y}
11 2: X2()
13 // should eat the comma.
14 // CHECK: 3: {foo}
15 #define X3(b, ...) {b, ## __VA_ARGS__}
16 3: X3(foo)
20 // PR3880
21 // CHECK: 4: AA BB
22 #define X4(...) AA , ## __VA_ARGS__ BB
23 4: X4()
25 // PR7943
26 // CHECK: 5: 1
27 #define X5(x,...) x##,##__VA_ARGS__
28 5: X5(1)