https://github.com/flash1729 created https://github.com/llvm/llvm-project/pull/206309
These operator== and operator!= templates in YAMLGenerator.cpp were never called. They went in as infrastructure that never got wired up, and a later static cleanup exposed them under -Wunused-template. Remove the dead code. NFC. Part of #202945. >From a22ae1ec82a76678a45a76b20bbb2986b9507aea Mon Sep 17 00:00:00 2001 From: flash1729 <[email protected]> Date: Sun, 28 Jun 2026 10:29:08 +0530 Subject: [PATCH] [clang-doc] Remove unused simple_ilist comparison operators (NFC) These operator== and operator!= templates were never called, so they trip -Wunused-template. Remove the dead code. --- clang-tools-extra/clang-doc/YAMLGenerator.cpp | 18 ------------------ 1 file changed, 18 deletions(-) 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 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
