Author: Paul Kirth
Date: 2026-05-22T17:55:35Z
New Revision: 1126c3f5b3d8f3fba55b372e64002d9561e14644

URL: 
https://github.com/llvm/llvm-project/commit/1126c3f5b3d8f3fba55b372e64002d9561e14644
DIFF: 
https://github.com/llvm/llvm-project/commit/1126c3f5b3d8f3fba55b372e64002d9561e14644.diff

LOG: [clang-doc][nfc] Prefer range based APIs (#198070)

Added: 
    

Modified: 
    clang-tools-extra/clang-doc/Representation.cpp
    clang-tools-extra/clang-doc/YAMLGenerator.cpp

Removed: 
    


################################################################################
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