summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle-subst.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-02-18 02:28:01 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-02-18 02:28:01 +0000
commita88b359fdc59e46e8b784fb4f4d08dc482c5d2c9 (patch)
treeaf43678a2ef57932fd9f84e3eb538d1a5390885d /clang/test/CodeGenCXX/mangle-subst.cpp
parent0ba644b66b34f453b70f021391702827f5036afe (diff)
downloadbcm5719-llvm-a88b359fdc59e46e8b784fb4f4d08dc482c5d2c9.tar.gz
bcm5719-llvm-a88b359fdc59e46e8b784fb4f4d08dc482c5d2c9.zip
Itanium ABI: Improve our mangling of <destructor-name>
Our mangling of <destructor-name> wasn't quite right: we'd introduce mangling substitutions where one shouldn't be possible. We also didn't correctly handle the case where the destroyed type was not dependent but still a TemplateSpecializationType. N.B. There isn't a mangling for a template-template parameter showing up as the destroyed type. We do the 'obvious' thing and mangle the index of the parameter. llvm-svn: 229615
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-subst.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-subst.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-subst.cpp b/clang/test/CodeGenCXX/mangle-subst.cpp
index 30360aeae31..09326e2acf2 100644
--- a/clang/test/CodeGenCXX/mangle-subst.cpp
+++ b/clang/test/CodeGenCXX/mangle-subst.cpp
@@ -80,3 +80,19 @@ void f(void (B::*)(), A, A) { }
void f(void (B::*)(), A, A, void (B::*)(A), void (A::*)()) { }
}
+
+namespace ManglePrefix {
+template <typename>
+struct X {
+ template <typename>
+ struct Y {
+ typedef int type;
+ typedef int type2;
+ };
+};
+template <typename T>
+typename X<T>::template Y<T>::type f(typename X<T>::template Y<T>::type2) { return 0; }
+
+// CHECK: @_ZN12ManglePrefix1fIiEENS_1XIT_E1YIS2_E4typeENS5_5type2E
+template int f<int>(int);
+}
OpenPOWER on IntegriCloud