Clang Project

clang_source_code/test/Preprocessor/macro_paste_commaext.c
1// RUN: %clang_cc1 %s -E | FileCheck --strict-whitespace --match-full-lines %s
2
3// In the following tests, note that the output is sensitive to the
4// whitespace *preceding* the varargs argument, as well as to
5// interior whitespace. AFAIK, this is the only case where whitespace
6// preceding an argument matters, and might be considered a bug in
7// GCC. Nevertheless, since this feature is a GCC extension in the
8// first place, we'll follow along.
9
10#define debug(format, ...) format, ## __VA_ARGS__)
11// CHECK:V);
12debug(V);
13// CHECK:W,1, 2);
14debug(W,1, 2);
15// CHECK:X, 1, 2);
16debug(X, 1, 2 );
17// CHECK:Y,);
18debug(Y, );
19// CHECK:Z,);
20debug(Z,);
21