Skip to content

[6.0][SourceKit] Stop printing normal comments in clang generated interface #72574

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

rintaro
Copy link
Member

@rintaro rintaro commented Mar 25, 2024

Cherry-pick #72420 #72553 into release/6.0

  • Explanation: Generated interfaces for Clang modules used to try printing normal comments and whitespaces between decls extracted from the header text. That's was getting confusing mainly because of "import as member" which reorders decls in the header files. So stop printing normal comments for Clang decls.
  • Scope: Generated interface in SourceKit
  • Risk: Low. Changes are simple. Nobody should rely on the comments/whitespaces in generated interfaces
  • Testing: Updated regression test cases
  • Issues: rdar://93731287
  • Reviewers: Alex Hoppen (@ahoppen) Hamish Knight (@hamishknight)

rintaro added 2 commits March 26, 2024 07:16
Generated interfaces for Clang modules used to try printing normal
comments between decls extracted from the header text. That was because
doc-comment was not common in C/ObjC headers. But mainly because of
"import as member feature" Clang decls aren't printed in the order as
they appear in the header file, the logic determinig which comment
belongs to which decl was not working property. We've decided to remove
that feature and only print the proper doc-comments as it has been
getting common.

rdar://93731287
(cherry picked from commit c9785d9)
Previously, Clang modules didn't have empty lines between top-level
decls. This was inconsistent with Swift module.

(cherry picked from commit 7b3738d)
@rintaro rintaro requested a review from a team as a code owner March 25, 2024 22:19
@rintaro
Copy link
Member Author

rintaro commented Mar 25, 2024

swiftlang/llvm-project#8468
@swift-ci Please test

@rintaro rintaro merged commit 7da1fc7 into swiftlang:release/6.0 Mar 28, 2024
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