llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

This warning was enabled by default in clang 23.1.0 (although reverted for 
23.1.1). These fixes still make sense to perform though. Template definitions 
in headers should not use static, and others are completely unused.

---
Full diff: https://github.com/llvm/llvm-project/pull/221815.diff


2 Files Affected:

- (modified) lldb/unittests/Protocol/ProtocolMCPServerTest.cpp (-34) 
- (modified) lldb/unittests/TestingSupport/TestUtilities.h (+1-1) 


``````````diff
diff --git a/lldb/unittests/Protocol/ProtocolMCPServerTest.cpp 
b/lldb/unittests/Protocol/ProtocolMCPServerTest.cpp
index d83cbfd7c036d..4b07682bc5df7 100644
--- a/lldb/unittests/Protocol/ProtocolMCPServerTest.cpp
+++ b/lldb/unittests/Protocol/ProtocolMCPServerTest.cpp
@@ -211,42 +211,8 @@ class ProtocolServerMCPTest : public testing::Test {
     Response resp = promised_result.get_future().get();
     return toJSON(resp);
   }
-
-  template <typename Result>
-  Expected<json::Value>
-  Capture(llvm::unique_function<void(Reply<Result>)> &fn) {
-    std::promise<llvm::Expected<Result>> promised_result;
-    fn([&promised_result](llvm::Expected<Result> result) {
-      promised_result.set_value(std::move(result));
-    });
-    Run();
-    llvm::Expected<Result> result = promised_result.get_future().get();
-    if (!result)
-      return result.takeError();
-    return toJSON(*result);
-  }
-
-  template <typename Result, typename Params>
-  Expected<json::Value>
-  Capture(llvm::unique_function<void(const Params &, Reply<Result>)> &fn,
-          const Params &params) {
-    std::promise<llvm::Expected<Result>> promised_result;
-    fn(params, [&promised_result](llvm::Expected<Result> result) {
-      promised_result.set_value(std::move(result));
-    });
-    Run();
-    llvm::Expected<Result> result = promised_result.get_future().get();
-    if (!result)
-      return result.takeError();
-    return toJSON(*result);
-  }
 };
 
-template <typename T>
-inline testing::internal::EqMatcher<llvm::json::Value> HasJSON(T x) {
-  return testing::internal::EqMatcher<llvm::json::Value>(toJSON(x));
-}
-
 } // namespace
 
 TEST_F(ProtocolServerMCPTest, Initialization) {
diff --git a/lldb/unittests/TestingSupport/TestUtilities.h 
b/lldb/unittests/TestingSupport/TestUtilities.h
index 68b4dbc127a7d..f322716eb6977 100644
--- a/lldb/unittests/TestingSupport/TestUtilities.h
+++ b/lldb/unittests/TestingSupport/TestUtilities.h
@@ -65,7 +65,7 @@ class TestFile {
   std::string Buffer;
 };
 
-template <typename T> static llvm::Expected<T> roundtripJSON(const T &input) {
+template <typename T> llvm::Expected<T> roundtripJSON(const T &input) {
   std::string encoded;
   llvm::raw_string_ostream OS(encoded);
   OS << toJSON(input);

``````````

</details>


https://github.com/llvm/llvm-project/pull/221815
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to