[cfe-commits] r145372 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseDecl.cpp lib/Parse/ParseTemplate.cpp test/FixIt/fixit-cxx0x.cpp test/FixIt/fixit.c test/FixIt/fixit.cpp test/SemaCXX/typedef-redecl.cpp

Richard Smith richard at metafoo.co.uk
Tue Nov 29 01:29:42 PST 2011


> On Tue, November 29, 2011 06:23, David Blaikie wrote:
>> It'd also be rather easy to implement a fixit for this recovery too,
>> just on the diagnostic a few lines above:
>>
>> Diag(Tok, diag::err_function_declared_typedef) <<
>> FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());
>
> Yes, if we are suitably confident that removing the 'typedef' keyword is the
> right fix. I think that is probably fine -- I've personally only ever seen this
> happen once, and there the 'typedef' keyword was supposed to be 'typename'
> (which we will have already provided a separate fixit to add).

I've added a fixit for this case in r145395.

Thanks,
Richard




More information about the cfe-commits mailing list