summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/assembler-with-cpp.c
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2013-10-21 05:02:28 +0000
committerJustin Bogner <mail@justinbogner.com>2013-10-21 05:02:28 +0000
commit535351305825b1896ce3970d606680addaa0942c (patch)
treeaccdc838363a490dc0f2cf6775d608674af91cf8 /clang/test/Preprocessor/assembler-with-cpp.c
parent1483143e7aa95ed618e69fccd38e32f8250bcad0 (diff)
downloadbcm5719-llvm-535351305825b1896ce3970d606680addaa0942c.tar.gz
bcm5719-llvm-535351305825b1896ce3970d606680addaa0942c.zip
Lex: Don't restrict legal UCNs when preprocessing assembly
The C and C++ standards disallow using universal character names to refer to some characters, such as basic ascii and control characters, so we reject these sequences in the lexer. However, when the preprocessor isn't being used on C or C++, it doesn't make sense to apply these restrictions. Notably, accepting these characters avoids issues with unicode escapes when GHC uses the compiler as a preprocessor on haskell sources. Fixes rdar://problem/14742289 llvm-svn: 193067
Diffstat (limited to 'clang/test/Preprocessor/assembler-with-cpp.c')
-rw-r--r--clang/test/Preprocessor/assembler-with-cpp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/assembler-with-cpp.c b/clang/test/Preprocessor/assembler-with-cpp.c
index 65be5647861..f03cb06ea11 100644
--- a/clang/test/Preprocessor/assembler-with-cpp.c
+++ b/clang/test/Preprocessor/assembler-with-cpp.c
@@ -72,6 +72,9 @@
11: T11(b)
// CHECK-Identifiers-True: 11: #0
+// Universal character names can specify basic ascii and control characters
+12: \u0020\u0030\u0080\u0000
+// CHECK-Identifiers-False: 12: \u0020\u0030\u0080\u0000
// This should not crash
// rdar://8823139
OpenPOWER on IntegriCloud