Skip to content

[5.9][Macros] Don't fold operators in unnecessary nodes #1676

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 18, 2023

Cherry-pick #1657 into release/5.9

  • Explanation: For attached macros, operator folding should only be done for the attribute syntax node, but not for the target declaration syntax and the parent decl syntax. This aligns with the compiler's ASTGen.
  • Scope: Macro executable plugin
  • Risk: Low. The change is small and straightforward, this is a new feature so nothing should depends on the old behavior
  • Testing: Passes current test suite
  • Issue: rdar://109494050
  • Reviwer: Ben Barham (@bnbarham), Doug Gregor (@DougGregor)

For attached macros, operator folding should only be done for the
attribute syntax node, but not for the target declaration syntax and
the parent decl syntax. This aligns with the compiler's ASTGen.

(cherry picked from commit d58ca93)
@rintaro rintaro requested a review from ahoppen as a code owner May 18, 2023 03:36
@rintaro
Copy link
Member Author

rintaro commented May 18, 2023

@swift-ci Please test

@rintaro rintaro merged commit 03cb7b0 into swiftlang:release/5.9 May 18, 2023
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