danix800 added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp:169 + else + Unused.push_back(&I); + continue; ---------------- sammccall wrote: > If we want this policy, it should be provided at the include-cleaner library > level so it applies to all clients, not just the clang-tidy check. > > I think the clearest way is to encapsulate this in include_cleaner::Includes, > so that match() never matches a Header requirement against a duplicative > Include. This will naturally lead to the directives being marked as unused. > > (In practice, the result will work in clangd, and will respect configuration > of headers where analysis should be ignored, keep directives, etc) I'll leave the policy part to another revision (maybe by others). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159263/new/ https://reviews.llvm.org/D159263 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits