diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-01-29 20:28:24 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-01-29 20:28:24 +0000 |
commit | fcf896078e58aeb7adecb1a0ae5c8e0052b17f9f (patch) | |
tree | 279654befd48f5e97275c1ebb820b9339152cfe9 /test/Preprocessor | |
parent | a16355c31878403443f99077cc8df8318457faf5 (diff) |
[Preprocessor] When checking if we can concatenate two tokens, check
if they were already concatenated in source using the spelling locations
even if they came from a macro expansion.
This fixes an issue where a GUID passed as macro argument ends up
malformed after preprocessing because we added spaces inside it.
rdar://13016645
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r-- | test/Preprocessor/output_paste_avoid.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Preprocessor/output_paste_avoid.c b/test/Preprocessor/output_paste_avoid.c index 8e4f3a4bf4..6defd1272b 100644 --- a/test/Preprocessor/output_paste_avoid.c +++ b/test/Preprocessor/output_paste_avoid.c @@ -31,3 +31,9 @@ E: test(str) #define equal = F: >>equal // CHECK: F: >> = + +// Make sure we don't introduce spaces in the guid because we try to avoid +// pasting '-' to a numeric constant. +#define TYPEDEF(guid) typedef [uuid(guid)] +TYPEDEF(66504301-BE0F-101A-8BBB-00AA00300CAB) long OLE_COLOR; +// CHECK: typedef [uuid(66504301-BE0F-101A-8BBB-00AA00300CAB)] long OLE_COLOR; |