[cfe-commits] PATCH: Restart handling of a function declarator if the function name was typo-corrected (issue 4929043)

Jordy Rose jediknil at belkadan.com
Sat Aug 20 22:34:12 PDT 2011


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...

Jordy


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





More information about the cfe-commits mailing list