[clang-tools-extra] [clangd] Remove unused onlyValue<bool> overload (NFC) (PR #206312)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 27 23:43:26 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tools-extra
Author: Aditya Medhane (flash1729)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/206312.diff
1 Files Affected:
- (modified) clang-tools-extra/clangd/CodeComplete.cpp (-8)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/206312
More information about the cfe-commits
mailing list