summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/mangle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r--test/CodeGenCXX/mangle.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp
index 5d757102ed25f..3a94071294d33 100644
--- a/test/CodeGenCXX/mangle.cpp
+++ b/test/CodeGenCXX/mangle.cpp
@@ -1111,3 +1111,17 @@ void fn(T, __underlying_type(T)) {}
template void fn<E>(E, __underlying_type(E));
// CHECK-LABEL: @_ZN6test552fnINS_1EEEEvT_U3eutS2_
}
+
+namespace test56 {
+ struct A { A *operator->(); int n; } a;
+ template<int N> void f(decltype(a->n + N)) {}
+ // CHECK-LABEL: @_ZN6test561fILi0EEEvDTplptL_ZNS_1aEE1nT_E
+ template void f<0>(int);
+}
+
+namespace test57 {
+ struct X { template <int N> int f(); } x;
+ template<int N> void f(decltype(x.f<0>() + N)) {}
+ // CHECK-LABEL: @_ZN6test571fILi0EEEvDTplcldtL_ZNS_1xEE1fIXLi0EEEET_E
+ template void f<0>(int);
+}