-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Remove delayed typo expressions #143423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AaronBallman
merged 14 commits into
llvm:main
from
AaronBallman:perf/aballman-delayed-typos
Jun 13, 2025
Merged
Remove delayed typo expressions #143423
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fd7cd1d
Disable delayed typo correction by default
AaronBallman 88ad970
Get the modules diagnostics back again
AaronBallman 5ab6e53
[WIP] Start ripping the functionality out entirely
AaronBallman ab5412f
[WIP] Remove more stuff
AaronBallman 193452b
[WIP] Remove TypoExpr
AaronBallman b304523
Remove the introduced feature flag
AaronBallman 68d0d91
Merge remote-tracking branch 'origin/main' into perf/aballman-delayed…
AaronBallman 0d191f1
Remove typo related AST dump tests
AaronBallman 22fc4d8
Update test
AaronBallman 4fc7a46
Now with whitespace added back
AaronBallman 83cc8d2
Update clangd test
AaronBallman 5ec886e
Add release note
AaronBallman 83e3695
Merge remote-tracking branch 'origin/main' into perf/aballman-delayed…
AaronBallman e662bf7
Merge remote-tracking branch 'origin/main' into perf/aballman-delayed…
AaronBallman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
despite typoexprs fragile and complicated nature, i think they were providing most of their value by preserving more nodes in the AST, that can later on be used by source tools (especially for more error correction :)).
I don't think we need
TypoExpr
s for most of this, if possible, preserving theseTypoExpr
nodes throughRecoveryExpr
s would actually help a lot with preserving current behavior of tools but also shape of the AST for any other application.I wouldn't block on this though, and wouldn't be surprised if this isn't trivial, we don't seem to be preserving typoexprs as recovery-exprs most of the time and I am not sure why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, making a
RecoveryExpr
in these cases would be helpful (though potentially nontrivial). There was another case where we dropped aReturnStmt
rather than giving it aRecoveryExpr
operand, and that caused follow-on diagnostics that were less than helpful.