[cfe-commits] r77464 - in /cfe/trunk: lib/Sema/SemaTemplate.cpp test/SemaTemplate/temp_class_spec.cpp
Douglas Gregor
dgregor at apple.com
Wed Jul 29 09:15:54 PDT 2009
Author: dgregor
Date: Wed Jul 29 11:15:53 2009
New Revision: 77464
URL: http://llvm.org/viewvc/llvm-project?rev=77464&view=rev
Log:
Remove an obsolete kludge based on the previous, completely broken handling of function templates
Modified:
cfe/trunk/lib/Sema/SemaTemplate.cpp
cfe/trunk/test/SemaTemplate/temp_class_spec.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=77464&r1=77463&r2=77464&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Wed Jul 29 11:15:53 2009
@@ -69,13 +69,8 @@
// FIXME: What follows is a slightly less gross hack than what used to
// follow.
- if (FunctionDecl *FD = dyn_cast<FunctionDecl>(IIDecl)) {
- if (FD->getDescribedFunctionTemplate()) {
- TemplateResult = TemplateTy::make(FD);
- return TNK_Function_template;
- }
- } else if (OverloadedFunctionDecl *Ovl
- = dyn_cast<OverloadedFunctionDecl>(IIDecl)) {
+ if (OverloadedFunctionDecl *Ovl
+ = dyn_cast<OverloadedFunctionDecl>(IIDecl)) {
for (OverloadedFunctionDecl::function_iterator F = Ovl->function_begin(),
FEnd = Ovl->function_end();
F != FEnd; ++F) {
Modified: cfe/trunk/test/SemaTemplate/temp_class_spec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp_class_spec.cpp?rev=77464&r1=77463&r2=77464&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/temp_class_spec.cpp (original)
+++ cfe/trunk/test/SemaTemplate/temp_class_spec.cpp Wed Jul 29 11:15:53 2009
@@ -325,7 +325,7 @@
template<class T> class A<int, T*, 5> { }; //#4
template<class T1, class T2, int I> class A<T1, T2*, I> { }; //#5
-// Redeclaration of class template partial specializations
+// Redefinition of class template partial specializations
template<typename T, T N, typename U> class A0;
template<typename T, T N> class A0<T, N, int> { }; // expected-note{{here}}
More information about the cfe-commits
mailing list