aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Lexer/unicode.c11
-rw-r--r--test/Lexer/utf8-invalid.c4
2 files changed, 15 insertions, 0 deletions
diff --git a/test/Lexer/unicode.c b/test/Lexer/unicode.c
index 26e77f61fd..de758f179a 100644
--- a/test/Lexer/unicode.c
+++ b/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
diff --git a/test/Lexer/utf8-invalid.c b/test/Lexer/utf8-invalid.c
index a387ff776f..2657b54c37 100644
--- a/test/Lexer/utf8-invalid.c
+++ b/test/Lexer/utf8-invalid.c
@@ -9,3 +9,7 @@ extern int ‚x; // expected-error{{source file is not valid UTF-8}}
// Don't warn about bad UTF-8 in raw lexing mode.
extern int ‚x;
#endif
+
+// Don't warn about bad UTF-8 in preprocessor directives.
+#define x82 ‚
+#pragma mark ‚