diff options
Diffstat (limited to 'test/CXX/lex/lex.literal/lex.ext')
-rw-r--r-- | test/CXX/lex/lex.literal/lex.ext/p12.cpp | 4 | ||||
-rw-r--r-- | test/CXX/lex/lex.literal/lex.ext/p2.cpp | 22 | ||||
-rw-r--r-- | test/CXX/lex/lex.literal/lex.ext/p5.cpp | 2 | ||||
-rw-r--r-- | test/CXX/lex/lex.literal/lex.ext/p7.cpp | 8 |
4 files changed, 18 insertions, 18 deletions
diff --git a/test/CXX/lex/lex.literal/lex.ext/p12.cpp b/test/CXX/lex/lex.literal/lex.ext/p12.cpp index dad4680..34a2f5c 100644 --- a/test/CXX/lex/lex.literal/lex.ext/p12.cpp +++ b/test/CXX/lex/lex.literal/lex.ext/p12.cpp @@ -15,7 +15,7 @@ void *operator""_x(const char*); // #2 void *a = 123_x; // ok, calls #2 int b = u8"\"ัะตัั ๐"_x; // ok, calls #1 int c = u8R"("ัะตัั ๐)"_x; // ok, calls #1 -int d = "test"_x; // expected-note {{in instantiation of function template specialization 'operator "" _x<char, 't', 'e', 's', 't'>' requested here}} +int d = "test"_x; // expected-note {{in instantiation of function template specialization 'operator""_x<char, 't', 'e', 's', 't'>' requested here}} int e = uR"("ัะตัั ๐)"_x; int f = UR"("ัะตัั ๐)"_x; -int g = UR"("ัะตัั_๐)"_x; // expected-note {{in instantiation of function template specialization 'operator "" _x<char32_t, 34, 1090, 1077, 1089, 1090, 95, 65536>' requested here}} +int g = UR"("ัะตัั_๐)"_x; // expected-note {{in instantiation of function template specialization 'operator""_x<char32_t, 34, 1090, 1077, 1089, 1090, 95, 65536>' requested here}} diff --git a/test/CXX/lex/lex.literal/lex.ext/p2.cpp b/test/CXX/lex/lex.literal/lex.ext/p2.cpp index 3f3f796..6942b68 100644 --- a/test/CXX/lex/lex.literal/lex.ext/p2.cpp +++ b/test/CXX/lex/lex.literal/lex.ext/p2.cpp @@ -3,14 +3,14 @@ typedef decltype(sizeof(int)) size_t; // FIXME: These diagnostics should say 'size_t' instead of 'unsigned long' -int a = 123_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'unsigned long long' or 'const char *', and no matching literal operator template}} -int b = 4.2_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'long double' or 'const char *', and no matching literal operator template}} -int c = "foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const char *' and 'unsigned}} -int d = L"foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const wchar_t *' and 'unsigned}} -int e = u8"foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const char *' and 'unsigned}} -int f = u"foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const char16_t *' and 'unsigned}} -int g = U"foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const char32_t *' and 'unsigned}} -int h = 'y'_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'char'}} -int i = L'y'_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'wchar_t'}} -int j = u'y'_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'char16_t'}} -int k = U'y'_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'char32_t'}} +int a = 123_x; // expected-error {{no matching literal operator for call to 'operator""_x' with argument of type 'unsigned long long' or 'const char *', and no matching literal operator template}} +int b = 4.2_x; // expected-error {{no matching literal operator for call to 'operator""_x' with argument of type 'long double' or 'const char *', and no matching literal operator template}} +int c = "foo"_x; // expected-error {{no matching literal operator for call to 'operator""_x' with arguments of types 'const char *' and 'unsigned}} +int d = L"foo"_x; // expected-error {{no matching literal operator for call to 'operator""_x' with arguments of types 'const wchar_t *' and 'unsigned}} +int e = u8"foo"_x; // expected-error {{no matching literal operator for call to 'operator""_x' with arguments of types 'const char *' and 'unsigned}} +int f = u"foo"_x; // expected-error {{no matching literal operator for call to 'operator""_x' with arguments of types 'const char16_t *' and 'unsigned}} +int g = U"foo"_x; // expected-error {{no matching literal operator for call to 'operator""_x' with arguments of types 'const char32_t *' and 'unsigned}} +int h = 'y'_x; // expected-error {{no matching literal operator for call to 'operator""_x' with argument of type 'char'}} +int i = L'y'_x; // expected-error {{no matching literal operator for call to 'operator""_x' with argument of type 'wchar_t'}} +int j = u'y'_x; // expected-error {{no matching literal operator for call to 'operator""_x' with argument of type 'char16_t'}} +int k = U'y'_x; // expected-error {{no matching literal operator for call to 'operator""_x' with argument of type 'char32_t'}} diff --git a/test/CXX/lex/lex.literal/lex.ext/p5.cpp b/test/CXX/lex/lex.literal/lex.ext/p5.cpp index d364a37..a516168 100644 --- a/test/CXX/lex/lex.literal/lex.ext/p5.cpp +++ b/test/CXX/lex/lex.literal/lex.ext/p5.cpp @@ -6,7 +6,7 @@ int &operator "" _x1 (const char *); double &operator "" _x1 (const char *, size_t); double &i1 = "foo"_x1; double &i2 = u8"foo"_x1; -double &i3 = L"foo"_x1; // expected-error {{no matching literal operator for call to 'operator "" _x1' with arguments of types 'const wchar_t *' and 'unsigned long'}} +double &i3 = L"foo"_x1; // expected-error {{no matching literal operator for call to 'operator""_x1' with arguments of types 'const wchar_t *' and 'unsigned long'}} char &operator "" _x1(const wchar_t *, size_t); char &i4 = L"foo"_x1; // ok diff --git a/test/CXX/lex/lex.literal/lex.ext/p7.cpp b/test/CXX/lex/lex.literal/lex.ext/p7.cpp index be97f0c..0b40ecd 100644 --- a/test/CXX/lex/lex.literal/lex.ext/p7.cpp +++ b/test/CXX/lex/lex.literal/lex.ext/p7.cpp @@ -14,10 +14,10 @@ long double operator "" _w(long double); std::string operator "" _w(const char16_t*, size_t); unsigned operator "" _w(const char*); int main() { - auto v1 = 1.2_w; // calls operator "" _w(1.2L) - auto v2 = u"one"_w; // calls operator "" _w(u"one", 3) - auto v3 = 12_w; // calls operator "" _w("12") - "two"_w; // expected-error {{no matching literal operator for call to 'operator "" _w' with arguments of types 'const char *' and 'unsigned long'}} + auto v1 = 1.2_w; // calls operator""_w(1.2L) + auto v2 = u"one"_w; // calls operator""_w(u"one", 3) + auto v3 = 12_w; // calls operator""_w("12") + "two"_w; // expected-error {{no matching literal operator for call to 'operator""_w' with arguments of types 'const char *' and 'unsigned long'}} same_type<decltype(v1), long double> test1; same_type<decltype(v2), std::string> test2; |