summaryrefslogtreecommitdiffstats
path: root/clang/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
commit0db0ca4364b670fb6a209b8d9b0030177db21d3b (patch)
treeed252bafafe898b807eb7428bd3ff996c7d93674 /clang/test/CodeGenCXX/mangle-ms-templates.cpp
parent28d06de6f6fb0d3f126c46ad4434c10fd315efa8 (diff)
downloadbcm5719-llvm-0db0ca4364b670fb6a209b8d9b0030177db21d3b.tar.gz
bcm5719-llvm-0db0ca4364b670fb6a209b8d9b0030177db21d3b.zip
[ms-cxxabi] Handle template-template arguments
Template-template arguments appear to be a rather simple encoding of the template's templated tag type. llvm-svn: 187751
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-ms-templates.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-ms-templates.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-ms-templates.cpp b/clang/test/CodeGenCXX/mangle-ms-templates.cpp
index 6e5be658242..25c8b43506d 100644
--- a/clang/test/CodeGenCXX/mangle-ms-templates.cpp
+++ b/clang/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>) {}
OpenPOWER on IntegriCloud