https://github.com/flash1729 created 
https://github.com/llvm/llvm-project/pull/206312

BundledEntry has three `std::string` members and no bool member, so the bool 
overload of onlyValue can never be instantiated. It has been dead since it was 
added and trips -Wunused-template.

NFC. Part of #202945.

>From 9828fffad56567e886caaba6696a5a8bd418208d Mon Sep 17 00:00:00 2001
From: flash1729 <[email protected]>
Date: Sun, 28 Jun 2026 10:29:18 +0530
Subject: [PATCH] [clangd] Remove unused onlyValue<bool> overload (NFC)

BundledEntry has no bool member, so this overload can never be instantiated.
It was dead code that trips -Wunused-template. Remove it.
---
 clang-tools-extra/clangd/CodeComplete.cpp | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/clang-tools-extra/clangd/CodeComplete.cpp 
b/clang-tools-extra/clangd/CodeComplete.cpp
index 9f7da6b6f8fac..5f70dfe0dfd71 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -556,14 +556,6 @@ struct CodeCompletionBuilder {
     return &(B->*Member);
   }
 
-  template <bool BundledEntry::*Member> const bool *onlyValue() const {
-    auto B = Bundled.begin(), E = Bundled.end();
-    for (auto *I = B + 1; I != E; ++I)
-      if (I->*Member != B->*Member)
-        return nullptr;
-    return &(B->*Member);
-  }
-
   std::string summarizeReturnType() const {
     if (auto *RT = onlyValue<&BundledEntry::ReturnType>())
       return *RT;

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

Reply via email to