mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-05 04:38:37 +00:00
eacd96d972
When a function-like macro definition ends with one of the macro's parameters, and the argument is empty, any whitespace before the parameter name in the macro definition needs to be preserved. Promoting the existing NextTokGetsSpace to a preserved bit-field and checking it at the end of the macro expansion allows it to be moved to the first token following the macro expansion result. Patch by Harald van Dijk! llvm-svn: 200786
8 lines
228 B
C
8 lines
228 B
C
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
|
|
|
|
#define FOO(x) x
|
|
#define BAR(x) x x
|
|
#define BAZ(x) [x] [ x] [x ]
|
|
[FOO()] [ FOO()] [FOO() ] [BAR()] [ BAR()] [BAR() ] BAZ()
|
|
// CHECK: [] [ ] [ ] [ ] [ ] [ ] [] [ ] [ ]
|