diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-01-31 19:48:48 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-01-31 19:48:48 +0000 |
commit | cc538345be8b30e4f47421a282ba254576e5b88b (patch) | |
tree | 0c7609cbdc4a09e8d48eb416684b9b39df84f386 /clang/test/Lexer/unicode.c | |
parent | b9baa448b95e71252fa67250b7dfc0ba73df4db2 (diff) | |
download | bcm5719-llvm-cc538345be8b30e4f47421a282ba254576e5b88b.tar.gz bcm5719-llvm-cc538345be8b30e4f47421a282ba254576e5b88b.zip |
Lexer: Don't warn about Unicode in preprocessor directives.
This allows people to use Unicode in their #pragma mark and in macros
that exist only to be string-ized.
<rdar://problem/13107323&13121362>
llvm-svn: 174081
Diffstat (limited to 'clang/test/Lexer/unicode.c')
-rw-r--r-- | clang/test/Lexer/unicode.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Lexer/unicode.c b/clang/test/Lexer/unicode.c index 26e77f61fdd..de758f179a4 100644 --- a/clang/test/Lexer/unicode.c +++ b/clang/test/Lexer/unicode.c @@ -10,6 +10,17 @@ extern int x; // expected-warning {{treating Unicode character as whitespace}} // CHECK: extern int {{x}} // CHECK: extern int {{x}} +#pragma mark ¡Unicode! + +#define COPYRIGHT Copyright © 2012 +#define XSTR(X) #X +#define STR(X) XSTR(X) + +static const char *copyright = STR(COPYRIGHT); // no-warning +// CHECK: static const char *copyright = "Copyright © {{2012}}"; + #if PP_ONLY +COPYRIGHT +// CHECK: Copyright © {{2012}} CHECK: The preprocessor should not complain about Unicode characters like ©. #endif |