[clang-tidy][NFC] Remove another ad-hoc exclusion for system headers (#190094)

This is another ad-hoc approach made obsolete by #151035.
This commit is contained in:
Victor Chernyakin
2026-04-02 13:52:47 -07:00
committed by GitHub
parent 7d2f2a3f4d
commit a413a40150

View File

@@ -54,13 +54,7 @@ void StdAllocatorConstCheck::registerMatchers(MatchFinder *Finder) {
void StdAllocatorConstCheck::check(const MatchFinder::MatchResult &Result) {
const auto *T = Result.Nodes.getNodeAs<TypeLoc>("type_loc");
if (!T)
return;
// Exclude TypeLoc matches in STL headers.
if (isSystem(Result.Context->getSourceManager().getFileCharacteristic(
T->getBeginLoc())))
return;
assert(T);
diag(T->getBeginLoc(),
"container using std::allocator<const T> is a deprecated libc++ "
"extension; remove const for compatibility with other standard "