2011-11-01 10:26:36 +08:00
|
|
|
|
// RUN: %clang_cc1 -x c++ -std=c++0x -fsyntax-only -verify %s
|
|
|
|
|
|
|
|
|
|
// This file should be encoded using ISO-8859-1, the string literals should
|
|
|
|
|
// contain the ISO-8859-1 encoding for the code points U+00C0 U+00E9 U+00EE
|
|
|
|
|
// U+00F5 U+00FC
|
|
|
|
|
|
|
|
|
|
void f() {
|
2012-01-26 06:34:12 +08:00
|
|
|
|
wchar_t const *a = L"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; // expected-error {{illegal character encoding in string literal}}
|
2011-11-01 10:26:36 +08:00
|
|
|
|
|
2012-01-26 06:34:12 +08:00
|
|
|
|
char16_t const *b = u"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
char32_t const *c = U"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
wchar_t const *d = LR"(<28><><EFBFBD><EFBFBD><EFBFBD>)"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
char16_t const *e = uR"(<28><><EFBFBD><EFBFBD><EFBFBD>)"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
char32_t const *f = UR"(<28><><EFBFBD><EFBFBD><EFBFBD>)"; // expected-error {{illegal character encoding in string literal}}
|
2012-02-11 13:08:10 +08:00
|
|
|
|
|
|
|
|
|
char const *g = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; // expected-warning {{illegal character encoding in string literal}}
|
|
|
|
|
char const *h = u8"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; // expected-error {{illegal character encoding in string literal}}
|
2012-03-09 05:59:28 +08:00
|
|
|
|
char const *i = R"(<28><><EFBFBD><EFBFBD><EFBFBD>)"; // expected-warning {{illegal character encoding in string literal}}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void g() {
|
|
|
|
|
wchar_t const *a = L"foo <20><><EFBFBD><EFBFBD><EFBFBD>"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
|
|
|
|
|
char16_t const *b = u"foo <20><><EFBFBD><EFBFBD><EFBFBD>"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
char32_t const *c = U"foo <20><><EFBFBD><EFBFBD><EFBFBD>"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
wchar_t const *d = LR"(foo <20><><EFBFBD><EFBFBD><EFBFBD>)"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
char16_t const *e = uR"(foo <20><><EFBFBD><EFBFBD><EFBFBD>)"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
char32_t const *f = UR"(foo <20><><EFBFBD><EFBFBD><EFBFBD>)"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
|
|
|
|
|
char const *g = "foo <20><><EFBFBD><EFBFBD><EFBFBD>"; // expected-warning {{illegal character encoding in string literal}}
|
|
|
|
|
char const *h = u8"foo <20><><EFBFBD><EFBFBD><EFBFBD>"; // expected-error {{illegal character encoding in string literal}}
|
|
|
|
|
char const *i = R"(foo <20><><EFBFBD><EFBFBD><EFBFBD>)"; // expected-warning {{illegal character encoding in string literal}}
|
2011-11-01 10:26:36 +08:00
|
|
|
|
}
|