Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More robust fix for crash on invalid range-based for statement.
Reliably mark the loop variable declaration in a range for as having an invalid initializer if anything goes wrong building the initializer. We previously based this determination on whether an error was emitted, which is not a reliable signal due to error suppression (during error recovery etc). Also, properly mark the variable as having initializer errors rather than simply marking it invalid. This is necessary to mark any structured bindings as invalid too. This generalizes the previous fix in 936ec89.
- Loading branch information
Showing
5 changed files
with
43 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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