summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/mangle.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-10-24 20:22:57 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-10-24 20:22:57 +0000
commit6e54638742f86ff22d09dba6ae7546904b9bf814 (patch)
treeaf7aaa5c88301fa5d1f0ad0aefce554dc004d519 /test/CodeGenCXX/mangle.cpp
parentd31d4ee16b9fd2de371e5aa3cdaf89ebb422bb8d (diff)
Itanium ABI: Template template parameters are usable as substitutions
Template template parameters weren't added to the list of substitutions. This would make the substitution map contain inaccurate mappings, leading to Clang violating the Itanium ABI and breaking compatibility with GCC. This fixes PR21351. Differential Revision: http://reviews.llvm.org/D5959 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r--test/CodeGenCXX/mangle.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp
index 9bdac7f172..9af0d9da99 100644
--- a/test/CodeGenCXX/mangle.cpp
+++ b/test/CodeGenCXX/mangle.cpp
@@ -991,3 +991,25 @@ namespace test48 {
template void f<S>(S::u *);
// CHECK-LABEL: define weak_odr void @_ZN6test481fINS_1SEEEvPTuNT_1uE(%"union.test48::S::u"*)
}
+
+namespace test49 {
+ template <int>
+ struct S {};
+
+ template <template <int> class T>
+ T<3> fin(T<3>);
+
+ auto v = fin<S>;
+ // CHECK-LABEL: declare void @_ZN6test493finINS_1SEEET_ILi3EES3_()
+}
+
+namespace test50 {
+ template <int>
+ struct S {};
+
+ template <template <int> class T>
+ T<3> fin(T<4>);
+
+ auto v = fin<S>;
+ // CHECK-LABEL: declare void @_ZN6test503finINS_1SEEET_ILi3EES2_ILi4EE()
+}