Removes filtering from the VisitUsingDecl method for implementation files.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Address review comments: turn all references into explicit, remove the "isHeader" field.
clang-tools-extra/include-cleaner/lib/WalkAST.cpp | ||
---|---|---|
87 | Ok, removed. Let me know if I should undo that eventually. |
clang-tools-extra/include-cleaner/lib/WalkAST.cpp | ||
---|---|---|
80 | i think having Ambiguous here for unused symbols is fine. we'd like to consider such symbols for the purposes of saying "yeah this include is probably used" but we shouldn't be inserting headers for the unused ones. do we have an example for the contrary? | |
clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp | ||
133 | you can drop this test now, having declaration in a header vs not doesn't make any difference. | |
141 | sorry if i am being dense but what's the difference we're trying to grasp between this and the next test case exactly? |
clang-tools-extra/include-cleaner/lib/WalkAST.cpp | ||
---|---|---|
80 | @hokein so what would be the final conclusion then? Should I re-introduce the "isUsed" check? | |
clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp | ||
133 | sure | |
137 | Ok, removed the header logic from testWalk, too. | |
141 | Yes, you're right. It probably only made sense before I removed the "isUsed" check. |
clang-tools-extra/include-cleaner/lib/WalkAST.cpp | ||
---|---|---|
80 | oh, right. Ambiguous is better, this is similar to OverloadExpr, we can't prove that the symbol is used. (sorry, I somewhat had an impression this should be explicit). |
Re-introduce the isUsed check.
clang-tools-extra/include-cleaner/lib/WalkAST.cpp | ||
---|---|---|
80 | Ok, thank you. I have re-introduced the isUsed check now. |
clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp | ||
---|---|---|
127 | this comment is stale, and the below one as well. |
Thanks.
You can add a Fix: https://github.com/llvm/llvm-project/issues/59147 in the commit message, it will automatically close the github issue when you commit the patch.
clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp | ||
---|---|---|
144 | nit: merge the following line with this line, })cpp" | |
152 | nit: fix the alignment | |
153 | nit: and here as well. |
The member field IsHeader is no longer used anywhere, we can remove it, which will simplify a few places, @kadircet any thoughts?