summaryrefslogtreecommitdiff
path: root/test/PCH
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH')
-rw-r--r--test/PCH/cxx-templates.cpp4
-rw-r--r--test/PCH/cxx-templates.h7
2 files changed, 11 insertions, 0 deletions
diff --git a/test/PCH/cxx-templates.cpp b/test/PCH/cxx-templates.cpp
index 58c4c177fd..6da5a75cdd 100644
--- a/test/PCH/cxx-templates.cpp
+++ b/test/PCH/cxx-templates.cpp
@@ -85,3 +85,7 @@ namespace rdar13135282 {
__mt_alloc<> mt = __mt_alloc<>();
}
}
+
+void CallDependentSpecializedFunc(DependentSpecializedFuncClass<int> &x) {
+ DependentSpecializedFunc(x);
+}
diff --git a/test/PCH/cxx-templates.h b/test/PCH/cxx-templates.h
index e672b0b387..00064aeefa 100644
--- a/test/PCH/cxx-templates.h
+++ b/test/PCH/cxx-templates.h
@@ -269,3 +269,10 @@ template<typename T> struct ContainsDoNotDeserialize2 {
};
template<typename T> int ContainsDoNotDeserialize<T>::doNotDeserialize = 0;
template<typename T> void ContainsDoNotDeserialize2<T>::doNotDeserialize() {}
+
+
+template<typename T> void DependentSpecializedFunc(T x) { x.foo(); }
+template<typename T> class DependentSpecializedFuncClass {
+ void foo() {}
+ friend void DependentSpecializedFunc<>(DependentSpecializedFuncClass);
+};