[llvm] [Support] Move HTTP client/server to new LLVMSupportHTTP lib (NFC) (PR #184572)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 01:54:40 PST 2026
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>,
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>,
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>,
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>,
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/184572 at github.com>
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- llvm/include/llvm/Debuginfod/Debuginfod.h llvm/lib/Debuginfod/Debuginfod.cpp llvm/tools/llvm-cov/CodeCoverage.cpp llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp llvm/tools/llvm-objdump/llvm-objdump.cpp llvm/tools/llvm-profdata/llvm-profdata.cpp llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp llvm/unittests/Debuginfod/DebuginfodTests.cpp llvm/include/llvm/Support/HTTP/HTTPClient.h llvm/include/llvm/Support/HTTP/HTTPServer.h llvm/lib/Support/HTTP/HTTPClient.cpp llvm/lib/Support/HTTP/HTTPServer.cpp llvm/unittests/Support/HTTP/HTTPServerTests.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/unittests/Debuginfod/DebuginfodTests.cpp b/llvm/unittests/Debuginfod/DebuginfodTests.cpp
index a5bceb136..2e39484e7 100644
--- a/llvm/unittests/Debuginfod/DebuginfodTests.cpp
+++ b/llvm/unittests/Debuginfod/DebuginfodTests.cpp
@@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/Debuginfod/Debuginfod.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/Path.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
diff --git a/llvm/unittests/Support/HTTP/HTTPServerTests.cpp b/llvm/unittests/Support/HTTP/HTTPServerTests.cpp
index 6c06ddf5e..1066fdd2f 100644
--- a/llvm/unittests/Support/HTTP/HTTPServerTests.cpp
+++ b/llvm/unittests/Support/HTTP/HTTPServerTests.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/Error.h"
#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/HTTP/HTTPServer.h"
-#include "llvm/Support/Error.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Testing/Support/Error.h"
#include "gmock/gmock.h"
@@ -237,15 +237,15 @@ TEST_F(HTTPClientServerTest, ClientTimeout) {
TEST_F(HTTPClientServerTest, PathMatching) {
HTTPServer Server;
- EXPECT_THAT_ERROR(
- Server.get(R"(/abc/(.*)/(.*))",
- [&](HTTPServerRequest &Request) {
- EXPECT_EQ(Request.UrlPath, "/abc/1/2");
- ASSERT_THAT(Request.UrlPathMatches,
- testing::ElementsAre("1", "2"));
- Request.setResponse({200u, "text/plain", Request.UrlPath});
- }),
- Succeeded());
+ EXPECT_THAT_ERROR(Server.get(R"(/abc/(.*)/(.*))",
+ [&](HTTPServerRequest &Request) {
+ EXPECT_EQ(Request.UrlPath, "/abc/1/2");
+ ASSERT_THAT(Request.UrlPathMatches,
+ testing::ElementsAre("1", "2"));
+ Request.setResponse(
+ {200u, "text/plain", Request.UrlPath});
+ }),
+ Succeeded());
EXPECT_THAT_ERROR(Server.get(UrlPathPattern,
[&](HTTPServerRequest &Request) {
llvm_unreachable(
``````````
</details>
https://github.com/llvm/llvm-project/pull/184572
More information about the llvm-commits
mailing list