https://github.com/ilovepi updated 
https://github.com/llvm/llvm-project/pull/198070

>From 8bd51395909e2012d24a8030eb37fb7c06bf8775 Mon Sep 17 00:00:00 2001
From: Paul Kirth <[email protected]>
Date: Sat, 16 May 2026 01:45:17 +0000
Subject: [PATCH] [clang-doc][nfc] Prefer range based APIs

---
 clang-tools-extra/clang-doc/Representation.cpp | 4 ++--
 clang-tools-extra/clang-doc/YAMLGenerator.cpp  | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/clang-tools-extra/clang-doc/Representation.cpp 
b/clang-tools-extra/clang-doc/Representation.cpp
index 1f67de639bbc8..73c8385cba2bc 100644
--- a/clang-tools-extra/clang-doc/Representation.cpp
+++ b/clang-tools-extra/clang-doc/Representation.cpp
@@ -20,6 +20,7 @@
 //
 
//===----------------------------------------------------------------------===//
 #include "Representation.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/Support/Error.h"
 #include "llvm/Support/Path.h"
@@ -306,8 +307,7 @@ bool CommentInfo::operator==(const CommentInfo &Other) 
const {
   if (FirstCI != SecondCI || Children.size() != Other.Children.size())
     return false;
 
-  return std::equal(Children.begin(), Children.end(), Other.Children.begin(),
-                    Other.Children.end());
+  return llvm::equal(Children, Other.Children);
 }
 
 bool CommentInfo::operator<(const CommentInfo &Other) const {
diff --git a/clang-tools-extra/clang-doc/YAMLGenerator.cpp 
b/clang-tools-extra/clang-doc/YAMLGenerator.cpp
index 93ece04b74476..88102e9c51d5f 100644
--- a/clang-tools-extra/clang-doc/YAMLGenerator.cpp
+++ b/clang-tools-extra/clang-doc/YAMLGenerator.cpp
@@ -10,6 +10,7 @@
 
 #include "Generators.h"
 #include "Representation.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/YAMLTraits.h"
 #include "llvm/Support/raw_ostream.h"
 #include <optional>
@@ -184,7 +185,7 @@ template <> struct ScalarTraits<SymbolID> {
   static SymbolID stringToSymbol(llvm::StringRef Value) {
     SymbolID USR;
     std::string HexString = fromHex(Value);
-    std::copy(HexString.begin(), HexString.end(), USR.begin());
+    llvm::copy(HexString, USR.begin());
     return SymbolID(USR);
   }
 

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

Reply via email to