[clang-tools-extra] df4f247 - [clang-doc] Remove unused simple_ilist comparison operators (NFC) (#206309)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 29 01:47:53 PDT 2026


Author: Aditya Medhane
Date: 2026-06-29T11:47:48+03:00
New Revision: df4f24741307ce8b7390f44bf45f844b8e124640

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

LOG: [clang-doc] Remove unused simple_ilist comparison operators (NFC) (#206309)

These operator== and operator!= templates in YAMLGenerator.cpp were
never called. They went in as infrastructure that never got wired up,
and now a cleanup exposed them under -Wunused-template. Remove the dead
code.

NFC. Part of #202945.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-doc/YAMLGenerator.cpp b/clang-tools-extra/clang-doc/YAMLGenerator.cpp
index 5a1d822526daa..7ccf526c59e22 100644
--- a/clang-tools-extra/clang-doc/YAMLGenerator.cpp
+++ b/clang-tools-extra/clang-doc/YAMLGenerator.cpp
@@ -32,24 +32,6 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(BaseRecordInfo)
 
 namespace llvm {
 
-template <typename T>
-static bool operator==(const llvm::simple_ilist<T> &LHS,
-                       const llvm::simple_ilist<T> &RHS) {
-  auto LIt = LHS.begin(), LEnd = LHS.end();
-  auto RIt = RHS.begin(), REnd = RHS.end();
-  for (; LIt != LEnd && RIt != REnd; ++LIt, ++RIt) {
-    if (!(*LIt == *RIt))
-      return false;
-  }
-  return LIt == LEnd && RIt == REnd;
-}
-
-template <typename T>
-static bool operator!=(const llvm::simple_ilist<T> &LHS,
-                       const llvm::simple_ilist<T> &RHS) {
-  return !(LHS == RHS);
-}
-
 namespace yaml {
 
 // Provide SequenceTraits for ArrayRef<T*> since YAMLTraits only provides it for


        


More information about the cfe-commits mailing list