aboutsummaryrefslogtreecommitdiff
path: root/test/Lexer/string-literal-encoding.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-02-11 05:08:10 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-02-11 05:08:10 +0000
commit91359302b822d829afa93c0dadf5f7ce6e19fbc6 (patch)
tree601729580f8b8e7d697dffde0d0657026cf95fd4 /test/Lexer/string-literal-encoding.c
parentd747efaad80117799ff7e2ab10608f18ee1348c1 (diff)
Implement warning for non-wide string literals with an unexpected encoding. Downgrade error for non-wide character literals with an unexpected encoding to a warning for compatibility with gcc and older versions of clang. <rdar://problem/10837678>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150295 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Lexer/string-literal-encoding.c')
-rw-r--r--test/Lexer/string-literal-encoding.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Lexer/string-literal-encoding.c b/test/Lexer/string-literal-encoding.c
index b12cfab156..aa7cb73f62 100644
--- a/test/Lexer/string-literal-encoding.c
+++ b/test/Lexer/string-literal-encoding.c
@@ -12,4 +12,7 @@ void f() {
wchar_t const *d = LR"(Àéîõü)"; // expected-error {{illegal character encoding in string literal}}
char16_t const *e = uR"(Àéîõü)"; // expected-error {{illegal character encoding in string literal}}
char32_t const *f = UR"(Àéîõü)"; // expected-error {{illegal character encoding in string literal}}
+
+ char const *g = "Àéîõü"; // expected-warning {{illegal character encoding in string literal}}
+ char const *h = u8"Àéîõü"; // expected-error {{illegal character encoding in string literal}}
}