================ @@ -179,12 +183,14 @@ void IncludeCleanerCheck::check(const MatchFinder::MatchResult &Result) { if (getCurrentMainFile().endswith(PHeader)) continue; } - - if (llvm::none_of( - IgnoreHeadersRegex, - [Resolved = (*I.Resolved).getFileEntry().tryGetRealPathName()]( - const llvm::Regex &R) { return R.match(Resolved); })) - Unused.push_back(&I); + auto StdHeader = tooling::stdlib::Header::named( ---------------- kadircet wrote:
ATM `shouldIgnore` is operating on an `include_cleaner::Header` (for good reason, as we need to use it both for missing and unused includes). Hence we can't really go from a physical Header to a stdlib one inside `shouldIgnore`. We can add overloads to accept both a Header and an Include, then we can move this logic into the relevant overload, but I don't think that'll be any cleaner. Did you have something else in mind? https://github.com/llvm/llvm-project/pull/68185 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits