Skip to content

[6.2] [IDE] Better handle macro trailing closures #81721

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
merged 4 commits into from
May 23, 2025

Conversation

hamishknight
Copy link
Contributor

6.2 cherry-pick of #81673

  • Explanation: Improves handling of trailing closure macro arguments in placeholder expansion and code completion
  • Scope: Affects placeholder expansion and completion
  • Issue: rdar://150550747
  • Risk: Low, only affects placeholder expansion and macro completion
  • Testing: Added tests to test suite
  • Reviewer: Rintaro Ishizaki

Allow macro argument placeholders to expand into trailing closures.

rdar://150550747
Introduce a new ASTWalker option for walking CustomAttrs and use it
for the placeholder scanner to ensure we can expand placeholders in
attribute arguments.
Follow the same logic as function decl completion and suggest a
trailing closure for trivial cases.

rdar://150550747
@hamishknight hamishknight requested a review from bnbarham May 22, 2025 19:25
@hamishknight hamishknight requested a review from a team as a code owner May 22, 2025 19:25
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels May 22, 2025
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 6f43724 into swiftlang:release/6.2 May 23, 2025
5 checks passed
@hamishknight hamishknight deleted the macrotrail-6.2 branch May 23, 2025 09:41
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 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants