summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/output_paste_avoid.c
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-01-29 20:28:24 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-01-29 20:28:24 +0000
commit005206a81362156299d4e928162b6b669c456918 (patch)
treed0a8a5ccc2b8ace8a1ddc85abf8c5c2acdac604c /clang/test/Preprocessor/output_paste_avoid.c
parentdd60e0902144a7e9a162a6f9aa6d333075c389a4 (diff)
downloadbcm5719-llvm-005206a81362156299d4e928162b6b669c456918.tar.gz
bcm5719-llvm-005206a81362156299d4e928162b6b669c456918.zip
[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 llvm-svn: 173826
Diffstat (limited to 'clang/test/Preprocessor/output_paste_avoid.c')
-rw-r--r--clang/test/Preprocessor/output_paste_avoid.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/output_paste_avoid.c b/clang/test/Preprocessor/output_paste_avoid.c
index 8e4f3a4bf4d..6defd1272b7 100644
--- a/clang/test/Preprocessor/output_paste_avoid.c
+++ b/clang/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;
OpenPOWER on IntegriCloud