Skip to content

[5.7][SymbolGraphGen] skip underscored implicit Clang decls #42496

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 1 commit into from
Apr 22, 2022

Conversation

QuietMisdreavus
Copy link
Contributor

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

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:07
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus QuietMisdreavus force-pushed the QuietMisdreavus/5.7/new-symbols branch from 956e295 to b0cb88f Compare April 20, 2022 21:42
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus QuietMisdreavus merged commit 279e07b into release/5.7 Apr 22, 2022
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/5.7/new-symbols branch April 22, 2022 22:43
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.

3 participants