mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-06 13:32:49 +00:00
502155aff9
In x ## y, where x and y are regular tokens, whitespace between x and ## is ignored, and whitespace between ## and y is also ignored. When either x or y is a function argument, whitespace was preserved, but it should not be. This patch removes the checks for whitespace before ## and before y, and in the special case where x is an empty macro argument and y is a regular token, actively removes whitespace before y. One existing test is affected by that change, but as clang's output now matches the standard's requirements and that of GCC, I've tweaked the testcase. Patch by Harald van Dijk! llvm-svn: 200785
14 lines
323 B
C
14 lines
323 B
C
// RUN: %clang_cc1 %s -E | grep 'V);'
|
|
// RUN: %clang_cc1 %s -E | grep 'W, 1, 2);'
|
|
// RUN: %clang_cc1 %s -E | grep 'X, 1, 2);'
|
|
// RUN: %clang_cc1 %s -E | grep 'Y,);'
|
|
// RUN: %clang_cc1 %s -E | grep 'Z,);'
|
|
|
|
#define debug(format, ...) format, ## __VA_ARGS__)
|
|
debug(V);
|
|
debug(W, 1, 2);
|
|
debug(X, 1, 2 );
|
|
debug(Y, );
|
|
debug(Z,);
|
|
|