Skip to content

Conversation

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Apr 27, 2023

  • Explanation: Eliminate another circular reference through macro expansion mangling by adjusting the starting declaration context to ensure that it is from a suitable "outer" context. While here, make sure we introduce private discriminators for expression macro manglings, so they don't conflict across source files.
  • Scope: Only affects the mangling of macro expansion buffers in narrow cases, i.e., when they occur within a property initializer.
  • Risk: Low, no effect in code that doesn't use macros, and this is a small adjustment to the context calculation for a case where the
  • Issue: rdar://108511666
  • Original pull request: [Macros] Adjust starting context for macro expansion mangling #65468

Eliminate another circular reference through macro expansion mangling
by adjusting the starting declaration context to ensure that it is from
a suitable "outer" context.

Fixes rdar://108511666.
@DougGregor DougGregor requested a review from a team as a code owner April 27, 2023 17:38
@DougGregor
Copy link
Member Author

@swift-ci please test

Expression macros ascribed to non-private contexts need private
discriminators so they don't conflict with other uses of the same macro
in other source files.

Thank you, Richard, for noticing this omission!
@DougGregor
Copy link
Member Author

@swift-ci please test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 94903f0 into swiftlang:release/5.9 Apr 28, 2023
@DougGregor DougGregor deleted the macro-mangle-not-initializer-5.9 branch April 28, 2023 13:35
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants