[llvm] [llvm][Support] Add function to read from raw_socket_stream file descriptor with timeout (PR #92308)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 06:29:32 PDT 2024
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 7832769d329ead264aff238c06dce086b3a74922 a7f9b96dea4a090ad1ff9c1d06cb7584c8f1fed5 -- llvm/include/llvm/Support/FileDescriptor.h llvm/lib/Support/FileDescriptor.cpp llvm/lib/Support/raw_socket_stream.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Support/FileDescriptor.cpp b/llvm/lib/Support/FileDescriptor.cpp
index 9ecf991fa5..aaed27a203 100644
--- a/llvm/lib/Support/FileDescriptor.cpp
+++ b/llvm/lib/Support/FileDescriptor.cpp
@@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Support/Error.h"
#include "llvm/Support/FileDescriptor.h"
+#include "llvm/Support/Error.h"
#include <atomic>
#include <chrono>
#include <poll.h>
@@ -25,7 +25,8 @@ static std::error_code getLastSocketErrorCode() {
}
template <typename T>
-llvm::Error llvm::manageTimeout(std::chrono::milliseconds Timeout, T &FD, int PipeFD) {
+llvm::Error llvm::manageTimeout(std::chrono::milliseconds Timeout, T &FD,
+ int PipeFD) {
static_assert(std::is_same_v<T, int> || std::is_same_v<T, std::atomic<int>>,
"FD must be of type int& or std::atomic<int>&");
``````````
</details>
https://github.com/llvm/llvm-project/pull/92308
More information about the llvm-commits
mailing list