On Mon, Aug 1, 2011 at 1:06 PM, Francois Pichet <[email protected]> wrote: > ok thanks for the review. I am slowly working on the rework (but I am > slow since this is summer time) 2 things I want to comment: > > >> + // Here we have an function template explicit specialization at class >> scope. >> + // The actually specialization will be postponed to template instatiation >> + // time via the ClassScopeFunctionSpecializationDecl node. >> + if (isDependantClassScopeExplicitSpecialization) { >> + ClassScopeFunctionSpecializationDecl *NewSpec = >> + ClassScopeFunctionSpecializationDecl::Create( >> + Context, CurContext, SourceLocation(), >> + cast<CXXMethodDecl>(NewFD)); >> + CurContext->addDecl(NewSpec); >> + // FIXME: This is hackish: set NewFD to invalid and Redeclaration to >> true, >> + // to prevent NewFD from been pushed into scope. >> + NewFD->setInvalidDecl(); >> + Redeclaration = true; >> + } >> >> Why not return return NewSpec, and have the caller recognize that it >> shouldn't try to make ClassScopeFunctionSpecializationDecls visible? (Since >> they aren't NamedDecls anyway). >> > > How can we return NewSpec here? This won't work, We need to return a > FunctionDecl otherwise the function body will be correctly parsed.
the function body will *not* be correctly parsed. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
