Skip to content

[6.0][Macros] Fix source location for declaration syntax of attached macros #73722

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

Merged

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented May 17, 2024

Cherry-pick #73716 into release/6.0

  • Explanation: The location of declaration for attaches macros were sent to executable plugins as if the declaration were in the source file of the attribute. This was problematic when the attribute is synsthesized by a macro. When source location were used in the plugin, for example, as a diagnostic location, it ended up with an unknown location. Use correct source file.
  • Scope: Executable plugin macro expansion.
  • Risk: Low. Fixing a silly simple mistake
  • Testing: Added a regression test case
  • Issue: rdar://128292573
  • Reviewer: Ben Barham (@bnbarham)

Use the correct source file.
Previously, the location of declaration macros were sent to executable
plugins as if the were in the source file of the attribute. This was
problematic when the attribute is synsthesized by a macro. When source
location were used in the plugin, for example, as a diagnostic location,
it ended up with an unknown location.

(cherry picked from commit 921555a)
@rintaro rintaro requested a review from a team as a code owner May 17, 2024 20:50
@rintaro
Copy link
Member Author

rintaro commented May 17, 2024

@swift-ci Please test

@rintaro rintaro enabled auto-merge May 18, 2024 00:26
@rintaro rintaro merged commit db12dff into swiftlang:release/6.0 May 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants