summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Lexer')
-rw-r--r--clang/test/Lexer/c90.c1
-rw-r--r--clang/test/Lexer/wchar.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Lexer/c90.c b/clang/test/Lexer/c90.c
index f74135542c4..d91057257df 100644
--- a/clang/test/Lexer/c90.c
+++ b/clang/test/Lexer/c90.c
@@ -30,4 +30,5 @@ void test2() {
void test3() {
(void)L"\u1234"; // expected-error {{unicode escape sequences are only valid in C99 or C++}}
+ (void)L'\u1234'; // expected-error {{unicode escape sequences are only valid in C99 or C++}}
}
diff --git a/clang/test/Lexer/wchar.c b/clang/test/Lexer/wchar.c
index cbc0c455f82..ac82c1f73b4 100644
--- a/clang/test/Lexer/wchar.c
+++ b/clang/test/Lexer/wchar.c
@@ -2,5 +2,11 @@
void f() {
(void)L"\U00010000"; // expected-warning {{character unicode escape sequence too long for its type}}
+
+ (void)L'\U00010000'; // expected-warning {{character unicode escape sequence too long for its type}}
+
+ (void)L'ab'; // expected-warning {{extraneous characters in wide character constant ignored}}
+
+ (void)L'a\u1000'; // expected-warning {{extraneous characters in wide character constant ignored}}
}
OpenPOWER on IntegriCloud