Skip to content

[IDE] Better handle macro trailing closures #81673

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 22, 2025

Conversation

hamishknight
Copy link
Contributor

  • Allow placeholder expansion to turn macro closure arguments into trailing closures
  • Allow placeholder expansion to work for CustomAttr arguments
  • Introduce a separate trailing closure completion for trivial trailing closure cases, matching the function declaration logic.

rdar://150550747

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
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hamishknight hamishknight merged commit 89f7a82 into swiftlang:main May 22, 2025
5 checks passed
@hamishknight hamishknight deleted the macrotrail branch May 22, 2025 19:01
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