[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

Nicolas van Kempen via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 5 10:37:12 PDT 2024


================
@@ -453,3 +458,29 @@ void testOperandPermutations(std::map<int, int>& Map) {
   // CHECK-MESSAGES: :[[@LINE-1]]:{{[0-9]+}}: warning: use 'contains' to check for membership [readability-container-contains]
   // CHECK-FIXES: if (!Map.contains(0)) {};
 }
+
+void testStringNops(std::string Str, std::string SubStr, std::string_view StrView) {
----------------
nicovank wrote:

```suggestion
void testStringNpos(std::string Str, std::string SubStr, std::string_view StrView) {
```

Just a typo.

https://github.com/llvm/llvm-project/pull/110351


More information about the cfe-commits mailing list