llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-tools-extra

Author: Thomas Köppe (tkoeppe)

<details>
<summary>Changes</summary>

"Effective" is the wrong word: Both overloads are effective; they do what 
they're supposed to do. But the character overload does less work.

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


2 Files Affected:

- (modified) clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp 
(+1-1) 
- (modified) 
clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp 
(+1-1) 


``````````diff
diff --git a/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp 
b/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
index 1d9325166e341..cd85136baf5ec 100644
--- a/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
@@ -88,7 +88,7 @@ void FasterStringFindCheck::check(const 
MatchFinder::MatchResult &Result) {
 
   diag(Literal->getBeginLoc(), "%0 called with a string literal consisting of "
                                "a single character; consider using the more "
-                               "effective overload accepting a character")
+                               "efficient overload accepting a character")
       << FindFunc
       << FixItHint::CreateReplacement(Literal->getSourceRange(), *Replacement);
 }
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp 
b/clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp
index 3999049a10718..79d6d23f47aa6 100644
--- 
a/clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp
+++ 
b/clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp
@@ -23,7 +23,7 @@ void StringFind() {
   std::string Str;
 
   Str.find("a");
-  // CHECK-MESSAGES: [[@LINE-1]]:12: warning: 'find' called with a string 
literal consisting of a single character; consider using the more effective 
overload accepting a character [performance-faster-string-find]
+  // CHECK-MESSAGES: [[@LINE-1]]:12: warning: 'find' called with a string 
literal consisting of a single character; consider using the more efficient 
overload accepting a character [performance-faster-string-find]
   // CHECK-FIXES: Str.find('a');
 
   // Works with the pos argument.

``````````

</details>


https://github.com/llvm/llvm-project/pull/187536
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to