[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-08-20 Thread David Goldman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369427: [Sema][Typo] Fix assertion failure for expressions with multiple typos (authored by dgoldman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository:

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-08-05 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 213438. dgoldman added a comment. - remove extra newline Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files: include/clang/Sema/Sema.h lib/Sema/SemaExprCXX.cpp

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-08-05 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 213437. dgoldman added a comment. Fix test failure via `TransformTypos` - Add a new property on Sema to track newly created Typos and use this from within TransformTypos in order to delete any Typos that are unreachable (tested in

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-07-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I don't think you need to change the `TreeTranform` base class to support this; `TreeTransform::TransformExpr` is an extension point which you can override from `TransformTypos` to inject the custom logic you need. But I also don't think this

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-07-25 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 211757. dgoldman added a comment. - Fix test failure: typo-correction-cxx11.cpp Make sure that `TryTransform` clears any TypoExprs that are created if it returns an invalid ExprResult (as the new TypoExprs are unreachable from the result). Repository:

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-07-22 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. In D62648#1596535 , @rsmith wrote: > Thanks, LGTM. Do you need someone to commit this for you? Nope, I can commit it. There's still one outstanding issue though: typo-correction-cxx11.cpp is still failing with the

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-07-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks, LGTM. Do you need someone to commit this for you? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 ___ cfe-commits mailing list

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-07-22 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 211184. dgoldman added a comment. - Bug fixes Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files: lib/Sema/SemaExprCXX.cpp test/Sema/typo-correction-recursive.cpp Index:

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-07-19 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 210862. dgoldman added a comment. - Minor fixes Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files: lib/Sema/SemaExprCXX.cpp test/Sema/typo-correction-recursive.cpp

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaExprCXX.cpp:7762-7764 + llvm::SmallDenseMap NewTransformCache; + auto SavedTransformCache = TransformCache; + TransformCache =

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-27 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:7762-7764 + llvm::SmallDenseMap NewTransformCache; + auto SavedTransformCache = TransformCache; + TransformCache = NewTransformCache; Should I do the same `std::move` and `clear`

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-27 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 206870. dgoldman marked 9 inline comments as done. dgoldman added a comment. - Minor fixes Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files: lib/Sema/SemaExprCXX.cpp

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks, this looks good; just some nits. Comment at: lib/Sema/SemaExprCXX.cpp:7616 /// anything (having been passed an empty TypoCorrection). - void EmitAllDiagnostics() { + void EmitAllDiagnostics(bool isAmbiguous) { for (TypoExpr *TE :

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-21 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 206011. dgoldman added a comment. - Add another test and fix up comment Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files: lib/Sema/SemaExprCXX.cpp

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-21 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 206009. dgoldman added a comment. - Fix ambiguity handling and add more tests Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files: lib/Sema/SemaExprCXX.cpp

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 203011. dgoldman added a comment. - Move if empty check back Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files: lib/Sema/SemaExprCXX.cpp

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 202938. dgoldman added a comment. - Remove unused State variable Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files: lib/Sema/SemaExprCXX.cpp

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-03 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked an inline comment as done. dgoldman added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:7762-7787 // Ensure none of the TypoExprs have multiple typo correction candidates // with the same edit length that pass all the checks and filters. //

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:7762-7787 // Ensure none of the TypoExprs have multiple typo correction candidates // with the same edit length that pass all the checks and filters. // TODO: Properly handle various permutations

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-03 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 202775. dgoldman marked an inline comment as done. dgoldman added a comment. - Fix discarded correction test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files:

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-03 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked 2 inline comments as done. dgoldman added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:7713-7714 + // Add the newly created typos to the TypoExprs list, even if they + // failed to apply. This allows them to be reaped although they

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-03 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 202772. dgoldman added a comment. - Fix diagnostics for ignored TypoExprs Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62648/new/ https://reviews.llvm.org/D62648 Files: lib/Sema/SemaExprCXX.cpp

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-05-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:7713-7714 + // Add the newly created typos to the TypoExprs list, even if they + // failed to apply. This allows them to be reaped although they won't + // emit any diagnostic. +

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-05-30 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As Typo Resolution can create new TypoExprs while resolving typos, it is necessary to recurse through the expression to search for more typos. This should fix the assertion failure in