Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

Identified with readability-container-contains.

Identified with readability-container-contains.
@llvmbot
Copy link
Member

llvmbot commented Nov 19, 2025

@llvm/pr-subscribers-llvm-support

Author: Kazu Hirata (kazutakahirata)

Changes

Identified with readability-container-contains.


Full diff: https://github.com/llvm/llvm-project/pull/168673.diff

1 Files Affected:

  • (modified) llvm/lib/Support/SpecialCaseList.cpp (+1-1)
diff --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp
index 9f069bebcec73..7495308675c1d 100644
--- a/llvm/lib/Support/SpecialCaseList.cpp
+++ b/llvm/lib/Support/SpecialCaseList.cpp
@@ -455,7 +455,7 @@ unsigned SpecialCaseList::Section::getLastMatch(StringRef Prefix,
 }
 
 bool SpecialCaseList::Section::hasPrefix(StringRef Prefix) const {
-  return Impl->Entries.find(Prefix) != Impl->Entries.end();
+  return Impl->Entries.contains(Prefix);
 }
 
 } // namespace llvm

@github-actions
Copy link

🐧 Linux x64 Test Results

  • 186358 tests passed
  • 4855 tests skipped

@kazutakahirata kazutakahirata merged commit c2445d9 into llvm:main Nov 19, 2025
12 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20251118_clang_tidy_readability-container-contains branch November 19, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants