-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address the LocIdAndInst::ReusingLoc TODO (#4211)
The TODO for switching to ReusingLoc (previously Untyped) had been there for a while, so I'm trying to address it here. The intent had been to be clearer about when the construction is validated, particularly so that we aren't accidentally accepting an incorrect NodeId. Note, this does fix an incorrect use of InvalidNodeId where NoLoc should've been called. Since this changes the semantics of when `Parse::NodeId` is helpful in `typed_nodes.h`, I'm doing a pass to either refine or switch to `Parse::InvalidNodeId` where it compiles. I think most remaining `Parse::NodeId` examples are things we _should_ be able to refine with a little more work (versus before where `Parse::NodeId` also indicated `LocId` construction might be used). I'm also changing context.h to use `requires` that match what `LocIdAndInst` has, I think it makes the diagnostics a little better. And note I do add an overload for `ImportIRInstId`, also matching `LocIdAndInst`, and widely used for import refs.
- Loading branch information
Showing
9 changed files
with
166 additions
and
144 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
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
Oops, something went wrong.