summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/mangle-unnameable-conversions.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-05-05 21:57:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-05-05 21:57:07 +0000
commit3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e (patch)
treeb08336e8100cbc8e287931126f179dd37225a94f /test/CodeGenCXX/mangle-unnameable-conversions.cpp
parent78a7d7d79964119a3f35b262eb154b5cbf1001ed (diff)
Implement support for C++0x alias templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle-unnameable-conversions.cpp')
-rw-r--r--test/CodeGenCXX/mangle-unnameable-conversions.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-unnameable-conversions.cpp b/test/CodeGenCXX/mangle-unnameable-conversions.cpp
new file mode 100644
index 0000000000..2132eff5e5
--- /dev/null
+++ b/test/CodeGenCXX/mangle-unnameable-conversions.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -std=c++0x -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+
+template<typename T> using id = T;
+struct S {
+ template<typename T, int N>
+ operator id<T[N]>&();
+ template<typename T, typename U>
+ operator id<T (U::*)()>() const;
+};
+
+void f() {
+ int (&a)[42] = S(); // CHECK: @_ZN1ScvRAT0__T_IiLi42EEEv(
+ char (S::*fp)() = S(); // CHECK: @_ZNK1ScvMT0_FT_vEIcS_EEv(
+};