[PATCH] D141271: [include-cleaner] Filter template instantiations from AST roots.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 9 04:52:09 PST 2023
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
thanks looks good!
Please remember to add a `FIX: <link to github issue>` to the commit message.
================
Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:387
+ private:
+ bool isImplicitTemplateInstantiation(const NamedDecl *D) {
+ return isImplicitTemplateSpecialization<FunctionDecl>(D) ||
----------------
VitaNuo wrote:
> hokein wrote:
> > we can move it to the above anonymous namespace as well (it is fine to have two functions with same name because of C++ overloads). In this case, I'd probably inline it in `HandleTopLevelDecl`.
> I am not sure I fully understand this comment, since I cannot both move this method to the anonymous namespace above and inline it at the same time. I have inlined it now, hopefully it looks fine to you.
the current code looks good. (I meant either, not both, sorry for the confusion)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141271/new/
https://reviews.llvm.org/D141271
More information about the cfe-commits
mailing list