summaryrefslogtreecommitdiff
path: root/clang/test/CXX/lex/lex.literal/lex.ext/p5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CXX/lex/lex.literal/lex.ext/p5.cpp')
-rw-r--r--clang/test/CXX/lex/lex.literal/lex.ext/p5.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CXX/lex/lex.literal/lex.ext/p5.cpp b/clang/test/CXX/lex/lex.literal/lex.ext/p5.cpp
new file mode 100644
index 0000000..4655aa1
--- /dev/null
+++ b/clang/test/CXX/lex/lex.literal/lex.ext/p5.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+
+using size_t = decltype(sizeof(int));
+
+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}}
+
+char &operator "" _x1(const wchar_t *, size_t);
+char &i4 = L"foo"_x1; // ok
+double &i5 = R"(foo)"_x1; // ok