llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-tidy

Author: Baranov Victor (vbvictor)

<details>
<summary>Changes</summary>



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


3 Files Affected:

- (modified) clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp 
(+8-8) 
- (modified) clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp (+1-1) 
- (modified) clang-tools-extra/clang-tidy/utils/Matchers.h (+2-2) 


``````````diff
diff --git a/clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp 
b/clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp
index 4feeaa18740d7..1e504f79f0f96 100644
--- a/clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp
+++ b/clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp
@@ -762,14 +762,14 @@ void FormatStringConverter::applyFixes(DiagnosticBuilder 
&Diag,
     // First move the value argument to the right place. But if there's a
     // pending c_str() removal then we must do that at the same time.
     if (const auto CStrRemovalMatch =
-            std::find_if(ArgCStrRemovals.cbegin(), ArgCStrRemovals.cend(),
-                         [ArgStartPos = Args[ValueArgIndex]->getBeginLoc()](
-                             const BoundNodes &Match) {
-                           // This c_str() removal corresponds to the argument
-                           // being moved if they start at the same location.
-                           const Expr *CStrArg = Match.getNodeAs<Expr>("arg");
-                           return ArgStartPos == CStrArg->getBeginLoc();
-                         });
+            llvm::find_if(ArgCStrRemovals,
+                          [ArgStartPos = Args[ValueArgIndex]->getBeginLoc()](
+                              const BoundNodes &Match) {
+                            // This c_str() removal corresponds to the argument
+                            // being moved if they start at the same location.
+                            const Expr *CStrArg = Match.getNodeAs<Expr>("arg");
+                            return ArgStartPos == CStrArg->getBeginLoc();
+                          });
         CStrRemovalMatch != ArgCStrRemovals.end()) {
       const std::string ArgText =
           withoutCStrReplacement(*CStrRemovalMatch, *Context);
diff --git a/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp 
b/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp
index a4251d5249e4a..0ab517d5d9bd4 100644
--- a/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp
+++ b/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp
@@ -103,7 +103,7 @@ static int compareHeaders(StringRef LHS, StringRef RHS,
                           IncludeSorter::IncludeStyle Style) {
   if (Style == IncludeSorter::IncludeStyle::IS_Google_ObjC) {
     const std::pair<const char *, const char *> &Mismatch =
-        std::mismatch(LHS.begin(), LHS.end(), RHS.begin(), RHS.end());
+        llvm::mismatch(LHS, RHS);
     if ((Mismatch.first != LHS.end()) && (Mismatch.second != RHS.end())) {
       if ((*Mismatch.first == '.') && (*Mismatch.second == '+'))
         return -1;
diff --git a/clang-tools-extra/clang-tidy/utils/Matchers.h 
b/clang-tools-extra/clang-tidy/utils/Matchers.h
index 83401e85c8da9..4637809c17c81 100644
--- a/clang-tools-extra/clang-tidy/utils/Matchers.h
+++ b/clang-tools-extra/clang-tidy/utils/Matchers.h
@@ -82,8 +82,8 @@ class MatchesAnyListedRegexNameMatcher
 public:
   explicit MatchesAnyListedRegexNameMatcher(
       llvm::ArrayRef<StringRef> NameList) {
-    std::transform(
-        NameList.begin(), NameList.end(), std::back_inserter(NameMatchers),
+    llvm::transform(
+        NameList, std::back_inserter(NameMatchers),
         [](const llvm::StringRef Name) { return NameMatcher(Name); });
   }
 

``````````

</details>


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

Reply via email to