Skip to content

[AST] ASTPrinter: Improvements to specifier and attribute printing #80843

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 5 commits into from
Apr 16, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Apr 16, 2025

  • Make sure that specifiers are always printed before attributes
  • Don't print @escaping if parameter is inout
  • Always print nonisolated(nonsending) as a first specifier
  • Make sure that attributes are consistently printed as attributes and specifiers as keywords

xedin added 5 commits April 15, 2025 14:52
When `nonisolated(nonsending)` parameter specifier is present
mark the declaration as caller isolated.
…ecifier first

This avoids any possible positioning issues between specifiers
and attributes.
All of the `inout` types are implicitly `@escaping`.
@xedin xedin changed the title [AST] ASTPrinter: Improvement to specifier and attribute printing [AST] ASTPrinter: Improvements to specifier and attribute printing Apr 16, 2025
@xedin
Copy link
Contributor Author

xedin commented Apr 16, 2025

@swift-ci please test

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@grynspan
Copy link
Contributor

@swift-ci test Linux platform

@xedin xedin merged commit 2f133b3 into swiftlang:main Apr 16, 2025
5 checks passed
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.

None yet

4 participants