1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -x c++ -std=c++0x -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc // This file should be encoded using ISO-8859-1, the string literals should
4*f4a2713aSLionel Sambuc // contain the ISO-8859-1 encoding for the code points U+00C0 U+00E9 U+00EE
5*f4a2713aSLionel Sambuc // U+00F5 U+00FC
6*f4a2713aSLionel Sambuc
f()7*f4a2713aSLionel Sambuc void f() {
8*f4a2713aSLionel Sambuc wchar_t const *a = L"�����"; // expected-error {{illegal character encoding in string literal}}
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc char16_t const *b = u"�����"; // expected-error {{illegal character encoding in string literal}}
11*f4a2713aSLionel Sambuc char32_t const *c = U"�����"; // expected-error {{illegal character encoding in string literal}}
12*f4a2713aSLionel Sambuc wchar_t const *d = LR"(�����)"; // expected-error {{illegal character encoding in string literal}}
13*f4a2713aSLionel Sambuc char16_t const *e = uR"(�����)"; // expected-error {{illegal character encoding in string literal}}
14*f4a2713aSLionel Sambuc char32_t const *f = UR"(�����)"; // expected-error {{illegal character encoding in string literal}}
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc char const *g = "�����"; // expected-warning {{illegal character encoding in string literal}}
17*f4a2713aSLionel Sambuc char const *h = u8"�����"; // expected-error {{illegal character encoding in string literal}}
18*f4a2713aSLionel Sambuc char const *i = R"(�����)"; // expected-warning {{illegal character encoding in string literal}}
19*f4a2713aSLionel Sambuc }
20*f4a2713aSLionel Sambuc
g()21*f4a2713aSLionel Sambuc void g() {
22*f4a2713aSLionel Sambuc wchar_t const *a = L"foo �����"; // expected-error {{illegal character encoding in string literal}}
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambuc char16_t const *b = u"foo �����"; // expected-error {{illegal character encoding in string literal}}
25*f4a2713aSLionel Sambuc char32_t const *c = U"foo �����"; // expected-error {{illegal character encoding in string literal}}
26*f4a2713aSLionel Sambuc wchar_t const *d = LR"(foo �����)"; // expected-error {{illegal character encoding in string literal}}
27*f4a2713aSLionel Sambuc char16_t const *e = uR"(foo �����)"; // expected-error {{illegal character encoding in string literal}}
28*f4a2713aSLionel Sambuc char32_t const *f = UR"(foo �����)"; // expected-error {{illegal character encoding in string literal}}
29*f4a2713aSLionel Sambuc
30*f4a2713aSLionel Sambuc char const *g = "foo �����"; // expected-warning {{illegal character encoding in string literal}}
31*f4a2713aSLionel Sambuc char const *h = u8"foo �����"; // expected-error {{illegal character encoding in string literal}}
32*f4a2713aSLionel Sambuc char const *i = R"(foo �����)"; // expected-warning {{illegal character encoding in string literal}}
33*f4a2713aSLionel Sambuc }
34