Add support for noinit
remote variables.
#27074
Open
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.
Closes #27068.
This PR adds support for
noinit
remote variables. There was previously no support for them, though I hadn't considered that case and as a consequence hadn't documented them. To support them, a degree of special-casing is required (anx = noinit
expression is specially treated, and we rewrite initialization expressions for remote variables).On the technical side, this PR adds a new overload to the remote variable builder. This overload is distinguished from others by a dummy
type
formal which is expected always to bevoid
(inspired by the type of thenoinit
global variable). This overload simply constructs a remote variable wrapper with anoinit
'ed temporary.While there, I noticed that an assertion was incorrectly flipped in the body of the code. This assertion was for a case ruled out by post-parse checks; in developer builds, it ought to always fire. However, I suspect it didn't cause any problems because assertions are disabled in release mode. I flipped the assertion to its correct value.