Here are my patch for making DiagnoseInvalidRedeclaration not typo-correction a function name to one that will create additional compiler errors, along with several cleanup/refactoring patches.
The refactoring in the second patch (the bool flag changes) was done to reduce how much extra data DiagnoseInvalidRedeclaration needs to be passed to be able to call Sema::ActOnFunctionDeclarator. It has the added bonus of making the parameter lists of several Sema methods less atrocious. :) Strictly speaking, the third patch (splitting up ActOnFunctionDeclarator a little) isn't needed by the other three patches. I'm including it here since it was a part of my work to trim down the extra arguments needed by DiagnoseInvalidRedeclaration, and it makes ActOnFunctionDeclarator a little less painful to examine. The fourth patch just removes a few of the extra args to ActOnFunctionDeclarator as the data is already in either the Declarator or the FunctionDecl (which I'd discovered while working on the previous two patches). Cheers, Kaelyn Kaelyn Uhrain (4): Only accept a typo correction if it doesn't trigger additional errors Move some bool flags out of function parameter lists. Move a couple chunks of ActOnFunctionDeclarator to separate functions Clean up DiagnoseInvalidRedeclaration a bit include/clang/Sema/DeclSpec.h | 17 +- include/clang/Sema/Sema.h | 33 +- lib/Parse/ParseCXXInlineMethods.cpp | 6 +- lib/Parse/ParseDeclCXX.cpp | 4 +- lib/Parse/Parser.cpp | 4 +- lib/Sema/SemaDecl.cpp | 674 +++++++++++++++++------------- lib/Sema/SemaDeclCXX.cpp | 20 +- lib/Sema/SemaTemplate.cpp | 6 +- lib/Sema/SemaTemplateInstantiateDecl.cpp | 13 +- test/SemaCXX/function-redecl.cpp | 5 +- 10 files changed, 444 insertions(+), 338 deletions(-) -- 1.7.3.1
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
