[PATCH] D152747: [include-cleaner] Traverse implicit template instantations if the templates are inside the main file.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 12 13:10:18 PDT 2023
hokein created this revision.
hokein added a reviewer: kadircet.
Herald added a project: All.
hokein requested review of this revision.
Herald added a project: clang-tools-extra.
This patch tweaks the WalkAST to traverse imlicit template
instantations, presumably this is a big behavior change.
when traversing impplicit instantations, all reported references are
implicit as they are not spelled in the source code, thus they are not
contributed to the #include insertions.
This would fix some unused-include false positives where we report an
#include is unused despite the used references is in an instantiated
body.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152747
Files:
clang-tools-extra/include-cleaner/lib/WalkAST.cpp
clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152747.530650.patch
Type: text/x-patch
Size: 5860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230612/4409b3d7/attachment.bin>
More information about the cfe-commits
mailing list