Skip to content

[5.7-04182022][SymbolGraphGen] skip underscored implicit Clang decls #42497

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

QuietMisdreavus
Copy link
Contributor

This is a cherry-pick of #42493 onto release/5.7-04182022.

Explanation: When generating symbol graphs for projects with a precompiled header and a minimum-access-level of internal, several implicit Clang decls started appearing after #41156 stopped unanimously filtering out underscore-prefixed symbols. This PR filters out implicit Clang decls with underscore-prefixed names, as they're unlikely to be useful to consumers of symbol graphs.

Scope: The change is isolated to SymbolGraphGen, and due to the behavior of underscored symbol filtering, should only affect symbol graphs where the minimum access level is set to internal or below.

Radar: rdar://92018648

Risk: Low. This won't affect normal compilation. The impact on symbol graphs is minimal; only implicit Clang decls in specific circumstances are filtered out.

Testing: A new lit test, SymbolGraph/ClangImporter/BridgingHeader.swift, has been added to verify that using a precompiled header does not add three specific decls otherwise added by Clang.

@QuietMisdreavus QuietMisdreavus requested a review from a team as a code owner April 20, 2022 21:10
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus QuietMisdreavus force-pushed the QuietMisdreavus/5.7-04182022/new-symbols branch from bda9811 to 5f13e02 Compare April 20, 2022 21:43
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test macOS

@DougGregor
Copy link
Member

@swift-ci please test macOS

@DougGregor DougGregor merged commit 677acd4 into release/5.7-04182022 Apr 23, 2022
@DougGregor DougGregor deleted the QuietMisdreavus/5.7-04182022/new-symbols branch April 23, 2022 15:12
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.

4 participants