Attempt typo correction for function calls with the wrong number of arguments.
Combined with typo correction's new ability to apply global/absolute nested name specifiers to possible corrections, cases such as in PR12287 where the desired function is being shadowed by a lexically closer function with the same name but a different number of parameters will now include a FixIt. On a side note, since the test for this change caused test/SemaCXX/typo-correction.cpp to exceed the typo correction limit for a single file, I've included a test case for exceeding the limit and added some comments to both the original and part two of typo-correction.cpp warning future editors of the files about the limit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185881 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/DiagnosticSemaKinds.td 16 additions, 0 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- lib/Sema/SemaExpr.cpp 98 additions, 4 deletionslib/Sema/SemaExpr.cpp
- test/FixIt/typo.cpp 8 additions, 0 deletionstest/FixIt/typo.cpp
- test/SemaCXX/default1.cpp 8 additions, 3 deletionstest/SemaCXX/default1.cpp
- test/SemaCXX/typo-correction-pt2.cpp 16 additions, 0 deletionstest/SemaCXX/typo-correction-pt2.cpp
- test/SemaCXX/typo-correction.cpp 11 additions, 0 deletionstest/SemaCXX/typo-correction.cpp
Loading
Please register or sign in to comment