]> granicus.if.org Git - clang/commitdiff
Simplistic test case for mangling of variadic templates. There is more to be done...
authorDouglas Gregor <dgregor@apple.com>
Tue, 4 Jan 2011 22:16:00 +0000 (22:16 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 4 Jan 2011 22:16:00 +0000 (22:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122845 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/mangle-variadic-templates.cpp [new file with mode: 0644]

diff --git a/test/CodeGenCXX/mangle-variadic-templates.cpp b/test/CodeGenCXX/mangle-variadic-templates.cpp
new file mode 100644 (file)
index 0000000..01d1d1a
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -std=c++0x -emit-llvm -o - %s | FileCheck %s
+
+template<unsigned I, typename ...Types>
+struct X { };
+
+// CHECK: define weak_odr void @_Z2f0IJEEv1XIXsZT_EJspRT_EE()
+template<typename ...Types>
+void f0(X<sizeof...(Types), Types&...>) { }
+
+template void f0(X<0>);
+
+// CHECK: define weak_odr void @_Z2f0IJifdEEv1XIXsZT_EJspRT_EE()
+template void f0<int, float, double>(X<3, int&, float&, double&>);