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

rikka at google.com rikka at google.com
Tue Aug 30 17:20:30 PDT 2011

On 2011/08/30 23:29:53, chandlerc wrote:
> Ugh. I dunno what the right call is here. This is a kinda horrible
hack, if
> slightly less horrible than the last iteration... But I don't think
anything is
> going to fix it short of the refactoring you have a FIXME for... I'd
> just wait for that refactoring to land, but maybe Doug feels

I agree this is a horrible hack (and right now feeling like it is only
marginally more horrid than the body of ActOnFunctionDeclarator), but I
don't know when the refactoring might even be close to landing... and
I'm starting to suspect the refactoring may not even help enough to
eliminate the need to pass a bunch of otherwise-unused arguments to
DiagnoseInvalidRedeclaration so that it can check a typo correction. Did
just discover that it would be possible to compute 4 of the 9 extra args
to ActOnFunctionDeclarator from within DiagnoseInvalidRedeclaration...

> http://codereview.appspot.com/4929043/diff/13001/lib/Sema/SemaDecl.cpp
> File lib/Sema/SemaDecl.cpp (right):

> lib/Sema/SemaDecl.cpp:4205: struct AoFDParameterPack {
> We need to put this into an anonymous namespace. Also, "ParameterPack"
> something very specific in C++. Maybe: ActOnFDArgs? Yuck. Dunno.

Done and done.


More information about the cfe-commits mailing list