-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SyntaxParse] Re-apply move-only ParsedRawSyntaxNode #27230
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
Conversation
Don't return reference for local temporary object rdar://problem/55421369
@swift-ci Please test |
@swift-ci Please ASAN test |
@@ -163,7 +164,8 @@ const SyntaxParsingContext *SyntaxParsingContext::getRoot() const { | |||
} | |||
|
|||
ParsedTokenSyntax SyntaxParsingContext::popToken() { | |||
return popIf<ParsedTokenSyntax>().getValue(); | |||
auto tok = popIf<ParsedTokenSyntax>(); | |||
return std::move(tok.getValue()); |
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.
In #27190, this was:
ParsedTokenSyntax &&SyntaxParsingContext::popToken() {
return std::move(popIf<ParsedTokenSyntax>().getValue());
}
This returns a reference to a field of the temporary local value of popIf<ParsedTokenSyntax>()
(Optional<ParsedTokenSyntax>
).
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.
@compnerd Could you check if this change doesn't break Windows build?
https://ci.swift.org/job/swift-PR-osx-ASAN-test/96/ Infrastructure issue? |
@swift-ci Please ASAN test |
The ASAN bot builds in release with debug info. It shouldn't catch this. |
@CodaFi As I noted in the description, I confirmed this change successfully compiles stdlib with asan+ubsan in both debug and release build in my local machine. @shahmishal Is there a way to invoke pull request CI with debug+ASAN ? |
@swift-ci Please test Windows |
preset=buildbot_incremental,tools=DA,stdlib=DA,build |
…xparsse-rdar55421369"" This reverts commit 00613db.
Revert #27203 with a fix.
Locally confirmed this successfully compiles stdlib with asan+ubsan in both debug and release build.
rdar://problem/55421369