[clang-tools-extra] [clang-tidy][NFC] Remove another ad-hoc exclusion for system headers (PR #190094)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 1 17:58:32 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tidy
Author: Victor Chernyakin (localspook)
<details>
<summary>Changes</summary>
This is another ad-hoc approach made obsolete by #<!-- -->151035.
---
Full diff: https://github.com/llvm/llvm-project/pull/190094.diff
1 Files Affected:
- (modified) clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.cpp (-7)
``````````diff
diff --git a/clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.cpp b/clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.cpp
index ff58505e8f87c..d82b34e803242 100644
--- a/clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.cpp
+++ b/clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.cpp
@@ -54,13 +54,6 @@ 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;
-
diag(T->getBeginLoc(),
"container using std::allocator<const T> is a deprecated libc++ "
"extension; remove const for compatibility with other standard "
``````````
</details>
https://github.com/llvm/llvm-project/pull/190094
More information about the cfe-commits
mailing list