Author: Thomas Köppe Date: 2026-03-20T12:29:54+03:00 New Revision: 4376bf27c1ef216df47075a3b89d93b0ccd45b57
URL: https://github.com/llvm/llvm-project/commit/4376bf27c1ef216df47075a3b89d93b0ccd45b57 DIFF: https://github.com/llvm/llvm-project/commit/4376bf27c1ef216df47075a3b89d93b0ccd45b57.diff LOG: [clang-tidy] Fix "effective" -> "efficient". (#187536) "Effective" is the wrong word: Both overloads are effective; they do what they're supposed to do. But the character overload does less work. Added: Modified: clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp Removed: ################################################################################ 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. _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
