[compiler-rt] [compiler-rt][Fuzzer] SetThreadName windows implementation new try. (PR #76761)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 14:57:52 PST 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 67c2e354c3f0326947914c097bf68997ac5065b2 d99a0f939ef40b79cac55a1212779b0004930b8c -- compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
index e47494060a..13f9a67a2f 100644
--- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
@@ -236,9 +236,10 @@ size_t PageSize() {
 }
 
 void SetThreadName(std::thread &thread, const std::string &name) {
-  typedef HRESULT(WINAPI *proc)(HANDLE, PCWSTR);
+  typedef HRESULT(WINAPI * proc)(HANDLE, PCWSTR);
   HMODULE kbase = GetModuleHandleA("KernelBase.dll");
-  proc ThreadNameProc = reinterpret_cast<proc>(GetProcAddress, "SetThreadDescription");
+  proc ThreadNameProc =
+      reinterpret_cast<proc>(GetProcAddress, "SetThreadDescription");
   if (proc) {
     std::wstring buf;
     auto sz = MultiByteToWideChar(CP_UTF8, 0, name.data(), -1, nullptr, 0);

``````````

</details>


https://github.com/llvm/llvm-project/pull/76761


More information about the llvm-commits mailing list