[libc-commits] [libc] [libc] Allow RPC interface to be compiled with MSVC (PR #190483)
via libc-commits
libc-commits at lists.llvm.org
Sat Apr 4 15:01:20 PDT 2026
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 -- libc/shared/rpc.h libc/shared/rpc_util.h --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/libc/shared/rpc.h b/libc/shared/rpc.h
index 521945684..682d2c701 100644
--- a/libc/shared/rpc.h
+++ b/libc/shared/rpc.h
@@ -27,11 +27,10 @@
#define __scoped_atomic_load_n(src, ord, scp) \
(decltype(*(src)))__iso_volatile_load32((const volatile __int32 *)(src))
#define __scoped_atomic_store_n(dst, src, ord, scp) \
- (sizeof(*(dst)) == 4 \
- ? (void)__iso_volatile_store32((volatile __int32 *)(dst), \
- (__int32)(src)) \
- : (void)__iso_volatile_store64((volatile __int64 *)(dst), \
- (__int64)(src)))
+ (sizeof(*(dst)) == 4 ? (void)__iso_volatile_store32( \
+ (volatile __int32 *)(dst), (__int32)(src)) \
+ : (void)__iso_volatile_store64( \
+ (volatile __int64 *)(dst), (__int64)(src)))
#define __scoped_atomic_fetch_or(src, val, ord, scp) \
_InterlockedOr((volatile long *)(src), (long)(val))
#define __scoped_atomic_fetch_and(src, val, ord, scp) \
``````````
</details>
https://github.com/llvm/llvm-project/pull/190483
More information about the libc-commits
mailing list