[cfe-commits] PATCH: Restart handling of a function declarator if the function name was typo-corrected (issue 4929043)
rikka at google.com
Mon Aug 22 09:30:42 PDT 2011
I agree that a fixit for const mismatches would be nice too, but the focus
of this patch is to address the situation where a function name is mistyped
and there is some other mismatch (such as const) that would cause the
typo-corrected function name to still not match an existing function
declaration. Right now clang will correct the typo but not let the user know
that there is still a problem (this is also not the only case where typo
correction can expose/generate additional error messages).
On Sat, Aug 20, 2011 at 10:34 PM, Jordy Rose <jediknil at belkadan.com> wrote:
> I'm not a fan of emitting errors for code the user didn't write, but I'd be
> okay with it if there was a fixit for the presence or absence of 'const' as
> well. Then we could make a two-step recovery.
> Actually, a fixit for const mismatches is probably a good idea anyway...
> On Aug 19, 2011, at 13:47, rikka at google.com wrote:
> > Reviewers: chandlerc,
> > Description:
> > Not sure if this is the right way (without a major rewrite of
> > Sema::CorrectTypo and friends) to achieve the goal, but it solves the
> > issue brought up by Jordy in response to r137966 where an out-of-line
> > function definition is not rechecked against existing declarations to
> > see if it is valid after being typo-corrected.
> > Please review this at http://codereview.appspot.com/4929043/
> > Affected files:
> > M lib/Sema/SemaDecl.cpp
> > M test/SemaCXX/function-redecl.cpp
> > <issue_4929043_patch.diff>_______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits