On Sat, Aug 6, 2011 at 1:11 PM, Douglas Gregor <[email protected]> wrote:
> > On Aug 4, 2011, at 4:43 PM, Kaelyn Uhrain wrote: > > On Thu, Aug 4, 2011 at 4:41 PM, Kaelyn Uhrain <[email protected]> wrote: > >> >> >> On Thu, Aug 4, 2011 at 4:36 PM, Chandler Carruth <[email protected]>wrote: >> >>> On Thu, Aug 4, 2011 at 4:35 PM, Kaelyn Uhrain <[email protected]> wrote: >>> >>>> I've committed the fix and test cases as r136943, and rebased my patch >>>> against that revision. >>> >>> >>> Missing attachment? (not a big deal, easy to review the original patch) >>> >> >> Grr.... >> > > WTF?! I've attached the patch TWICE now in gmail only to not have it go > out. :( Let's try a third time... > > Wait... dammit, I screwed up generating the patch and tried attaching a > 0-byte file. :'( > <typo-correction-template-overload.diff> > > > @@ -1458,10 +1459,13 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, > CXXScopeSpec &SS, LookupResult &R, > CDEnd = Corrected.end(); > CD != CDEnd; ++CD) { > if (FunctionDecl *FD = dyn_cast<FunctionDecl>(*CD)) > - AddOverloadCandidate(FD, DeclAccessPair::make(*CD, AS_none), > + AddOverloadCandidate(FD, DeclAccessPair::make(FD, AS_none), > Args, NumArgs, OCS); > - // TODO: Handle FunctionTemplateDecl and other Decl types that > - // support overloading and could be corrected by CorrectTypo. > + else if (FunctionTemplateDecl *FTD = > + dyn_cast<FunctionTemplateDecl>(*CD)) > + AddTemplateOverloadCandidate( > + FTD, DeclAccessPair::make(FTD, AS_none), > ExplicitTemplateArgs, > + Args, NumArgs, OCS); > > The FunctionTemplateDecl path looks good. Note that, if there are explicit > template arguments, we should not add FunctionDecls to the overload > candidate set. > Ah, good point. I'll go ahead and check in the one-line change adding " if (!ExplicitTemplateArgs || ExplicitTemplateArgs->size() == 0)" just before the call to AddOverloadCandidate so that FunctionDecls aren't added when there are explicit template arguments. Thanks, Kaelyn
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
