From: Douglas Gregor Date: Wed, 29 Jul 2009 16:15:53 +0000 (+0000) Subject: Remove an obsolete kludge based on the previous, completely broken handling of functi... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f27ac6a52075f9a717f649dd778270916864e0e;p=clang Remove an obsolete kludge based on the previous, completely broken handling of function templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77464 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index f27d551d10..55c43c2d0a 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -69,13 +69,8 @@ TemplateNameKind Sema::isTemplateName(const IdentifierInfo &II, Scope *S, // FIXME: What follows is a slightly less gross hack than what used to // follow. - if (FunctionDecl *FD = dyn_cast(IIDecl)) { - if (FD->getDescribedFunctionTemplate()) { - TemplateResult = TemplateTy::make(FD); - return TNK_Function_template; - } - } else if (OverloadedFunctionDecl *Ovl - = dyn_cast(IIDecl)) { + if (OverloadedFunctionDecl *Ovl + = dyn_cast(IIDecl)) { for (OverloadedFunctionDecl::function_iterator F = Ovl->function_begin(), FEnd = Ovl->function_end(); F != FEnd; ++F) { diff --git a/test/SemaTemplate/temp_class_spec.cpp b/test/SemaTemplate/temp_class_spec.cpp index 26a6a1dc38..e625009c46 100644 --- a/test/SemaTemplate/temp_class_spec.cpp +++ b/test/SemaTemplate/temp_class_spec.cpp @@ -325,7 +325,7 @@ template class A { }; //#3 template class A { }; //#4 template class A { }; //#5 -// Redeclaration of class template partial specializations +// Redefinition of class template partial specializations template class A0; template class A0 { }; // expected-note{{here}}