summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/cxx11-user-defined-literal.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-03-08 01:34:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-03-08 01:34:56 +0000
commitdd66be718f23c8149d74ae8b011b002e11e8d5ba (patch)
treebf101091563424b330a0cdff5423e2533e8756aa /test/CodeGenCXX/cxx11-user-defined-literal.cpp
parentffea6b4560cee39bd2a26f478e57da19fc3b47b2 (diff)
User-defined literal support for character literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/cxx11-user-defined-literal.cpp')
-rw-r--r--test/CodeGenCXX/cxx11-user-defined-literal.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/CodeGenCXX/cxx11-user-defined-literal.cpp b/test/CodeGenCXX/cxx11-user-defined-literal.cpp
index fbd3621014..4bd49c8b94 100644
--- a/test/CodeGenCXX/cxx11-user-defined-literal.cpp
+++ b/test/CodeGenCXX/cxx11-user-defined-literal.cpp
@@ -3,13 +3,16 @@
struct S { S(); ~S(); S(const S &); void operator()(int); };
using size_t = decltype(sizeof(int));
S operator"" _x(const char *, size_t);
+S operator"" _y(wchar_t);
void f() {
// CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8]* @{{.*}}, i32 0, i32 0), i64 3)
// CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8]* @{{.*}}, i32 0, i32 0), i64 3)
+ // CHECK: call void @_Zli2_yw({{.*}} 97)
// CHECK: call void @_ZN1SD1Ev({{.*}}) nounwind
// CHECK: call void @_ZN1SD1Ev({{.*}}) nounwind
- "foo"_x, "bar"_x;
+ // CHECK: call void @_ZN1SD1Ev({{.*}}) nounwind
+ "foo"_x, "bar"_x, L'a'_y;
}
template<typename T> auto g(T t) -> decltype("foo"_x(t)) { return "foo"_x(t); }