From 0fa93cecf26a157dec7def11ffa4080ae75fe559 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 19 Jun 2013 01:38:21 +0000 Subject: Add test coverage for serialization of dependent function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184275 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/PCH/cxx-templates.cpp | 4 ++++ test/PCH/cxx-templates.h | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'test/PCH') 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 &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 struct ContainsDoNotDeserialize2 { }; template int ContainsDoNotDeserialize::doNotDeserialize = 0; template void ContainsDoNotDeserialize2::doNotDeserialize() {} + + +template void DependentSpecializedFunc(T x) { x.foo(); } +template class DependentSpecializedFuncClass { + void foo() {} + friend void DependentSpecializedFunc<>(DependentSpecializedFuncClass); +}; -- cgit v1.2.1