[clang-tools-extra] [clang-tidy][IncludeCleaner] Fix analysis supression in presence of verbatim spellings (PR #68185)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 4 01:20:28 PDT 2023
================
@@ -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(
----------------
VitaNuo wrote:
I believe you could move this passage into the handling of standard headers in `shouldIgnore`. Then the below could also be simplified.
https://github.com/llvm/llvm-project/pull/68185
More information about the cfe-commits
mailing list