summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/mangle-ms-templates.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-08-05 22:26:46 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-08-05 22:26:46 +0000
commit02c44f0962c8739c447bc35688d47294f72494aa (patch)
treef9f364f44330f0bdb665d5c96189d66c314fbcf1 /test/CodeGenCXX/mangle-ms-templates.cpp
parent7802fc9e6cb488fc1321ce3f7431b7aeeefdd18f (diff)
[ms-cxxabi] Handle template-template arguments
Template-template arguments appear to be a rather simple encoding of the template's templated tag type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle-ms-templates.cpp')
-rw-r--r--test/CodeGenCXX/mangle-ms-templates.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-ms-templates.cpp b/test/CodeGenCXX/mangle-ms-templates.cpp
index 6e5be65824..25c8b43506 100644
--- a/test/CodeGenCXX/mangle-ms-templates.cpp
+++ b/test/CodeGenCXX/mangle-ms-templates.cpp
@@ -157,6 +157,35 @@ void variadic_class_instantiate() {
// CHECK: call {{.*}} @"\01??0?$VariadicClass@HD_N@@QAE@XZ"
// CHECK: call {{.*}} @"\01??0?$VariadicClass@_NDH@@QAE@XZ"
+template <typename T>
+struct Second {};
+
+template <typename T, template <class> class>
+struct Type {};
+
+template <template <class> class T>
+struct Type2 {};
+
+template <template <class> class T, bool B>
+struct Thing;
+
+template <template <class> class T>
+struct Thing<T, false> { };
+
+template <template <class> class T>
+struct Thing<T, true> { };
+
+void template_template_fun(Type<Thing<Second, true>, Second>) { }
+// CHECK: "\01?template_template_fun@@YAXU?$Type@U?$Thing@USecond@@$00@@USecond@@@@@Z"
+
+template <typename T>
+void template_template_specialization();
+
+template <>
+void template_template_specialization<void (Type<Thing<Second, true>, Second>)>() {
+}
+// CHECK: "\01??$template_template_specialization@$$A6AXU?$Type@U?$Thing@USecond@@$00@@USecond@@@@@Z@@YAXXZ"
+
// PR16788
template <decltype(nullptr)> struct S1 {};
void f(S1<nullptr>) {}