Skip to content

[5.9][Macros] Don't apply member attribute macros to expanded members. #66264

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

hborla
Copy link
Member

@hborla hborla commented Jun 1, 2023

(cherry picked from commit 14e92b2)

  • Explanation: The attached macro proposal states:

member attribute macros allow one to modify the member declarations that were explicitly written within the type or extension by adding new attributes to them

The implementation did not follow this, because it applied member attributes to other macro-expanded members. This change aligns the implementation with the proposal.

  • Scope: Only impacts member-attribute macros that are composed with other macro roles that can add members to a type, e.g. member or peer macros.
  • Issue: rdar://109217961
  • Risk: Very low; this is a one-line change within the code path that expands member-attribute macros that checks whether the given member is in a macro expansion buffer relative to its parent.
  • Testing: Added a test case.
  • Reviewer: @ahoppen
  • Main branch PR: [Macros] Don't apply member attribute macros to expanded members. #66258

@hborla hborla requested a review from a team as a code owner June 1, 2023 03:13
@hborla
Copy link
Member Author

hborla commented Jun 1, 2023

@swift-ci please test

@hborla hborla merged commit eaaaba9 into swiftlang:release/5.9 Jun 1, 2023
@hborla hborla deleted the 5.9-member-attribute-expanded-member branch June 1, 2023 13:55
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