mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-08 22:57:41 +00:00
977026c5f5
When x is empty, x ## is suppressed, and when y gets expanded, the fact that it follows ## is not available in the macro expansion result. The macro definition can be checked instead, the ## will be available there regardless of what x expands to. Fixes http://llvm.org/PR12767 Patch by Harald van Dijk! llvm-svn: 182699
18 lines
281 B
C
18 lines
281 B
C
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
|
|
|
|
#define FOO(X) X ## Y
|
|
a:FOO()
|
|
// CHECK: a:Y
|
|
|
|
#define FOO2(X) Y ## X
|
|
b:FOO2()
|
|
// CHECK: b:Y
|
|
|
|
#define FOO3(X) X ## Y ## X ## Y ## X ## X
|
|
c:FOO3()
|
|
// CHECK: c:YY
|
|
|
|
#define FOO4(X, Y) X ## Y
|
|
d:FOO4(,FOO4(,))
|
|
// CHECK: d:FOO4
|