Skip to content

[include-cleaner] Respect the UsingShadowDecl when find headers for ambiguous std symbols. #66485

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
Sep 22, 2023

Conversation

hokein
Copy link
Collaborator

@hokein hokein commented Sep 15, 2023

In libcpp, the std::remove(const char*) is a using decl in std namespace using ::remove, which was not handled correctly in headerForAmbiguousStdSymbol

ambiguous std symbols.

In libcpp, the `std::remove(const char*)` is a using decl in std
namespace `using ::remove`, which was not handled correctly in
`headerForAmbiguousStdSymbol`
@hokein hokein requested a review from kadircet September 15, 2023 10:05
Copy link
Member

@kadircet kadircet left a comment

Choose a reason for hiding this comment

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

thanks, lgtm!

@@ -587,6 +588,36 @@ TEST_F(HeadersForSymbolTest, AmbiguousStdSymbols) {
}
}

TEST_F(HeadersForSymbolTest, AmbiguousStdSymbolsUsingShadow) {
Copy link
Member

Choose a reason for hiding this comment

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

might be easier to test this in AnalysisTest, rather than writing a new ASTVisitor, but up to you.

@hokein hokein merged commit 7b3db80 into llvm:main Sep 22, 2023
@hokein hokein deleted the ambiguous-std-symbol branch September 22, 2023 12:35
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