Skip to content
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

[5.7] [Sema] Look through FunctionConversionExpr when finding @discardableResult callee #60386

Conversation

theblixguy
Copy link
Collaborator

@theblixguy theblixguy commented Aug 4, 2022

Description: When calling a @discardableResult @MainActor annotated function, the call to the function is wrapped in an implicit FunctionConversionExpr. The code was not looking through this expression to find the callee function and thus was incorrectly triggering a result of call to function <name> is unused warning. This warning does not trigger on 5.6, so it is a regression in 5.7.

Risk: Low, a tiny change to the logic to look through this implicit expression
Review by: @xedin
Testing: PR Testing
Original PR: #60324

@theblixguy theblixguy added the r5.7 label Aug 4, 2022
@theblixguy theblixguy requested a review from xedin August 4, 2022 00:35
@theblixguy theblixguy requested a review from a team as a code owner August 4, 2022 00:35
@theblixguy
Copy link
Collaborator Author

@swift-ci please test

@xedin xedin requested a review from hborla August 4, 2022 00:40
@lukeredpath
Copy link

This fix has not been included in the Xcode 14 release candidate, which is a bit of a surprise. Feedback filed FB11474967.

@tkremenek
Copy link
Member

I think this fix was right at the edge of the qualification window for 5.7.0, but the 5.7 branch will be the basis of potential minor dot updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants