llvm-project
efc98de8 - [clang-tidy][NFC] Remove ad-hoc `unless(isExpansionInSystemHeader())` from matchers (#183020)

Commit
60 days ago
[clang-tidy][NFC] Remove ad-hoc `unless(isExpansionInSystemHeader())` from matchers (#183020) #151035 centralized the code to skip matching nodes in system headers, so individual checks no longer need the `unless(isExpansionInSystemHeader())` boilerplate to achieve that. You can verify that the logic introduced in that PR is equivalent to `unless(isExpansionInSystemHeader())`; they both essentially boil down to `!SourceManager.isInSystemHeader(Node.getBeginLoc())`: https://github.com/llvm/llvm-project/blob/7c5c58cdc6553c969a11fee51bfd23ae659220d4/clang/include/clang/ASTMatchers/ASTMatchers.h#L283-L291 https://github.com/llvm/llvm-project/blob/7c5c58cdc6553c969a11fee51bfd23ae659220d4/clang/lib/ASTMatchers/ASTMatchFinder.cpp#L1363-L1372 I audited all the uses of `isExpansionInSystemHeader` in the codebase, and the only one I found that wasn't redundant was one in `TaggedUnionMemberCountCheck.cpp`.
Author
Parents
Loading