[compiler-rt] [compiler-rt] Work around a warning from -Wgnu-anonymous-struct (PR #120314)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 14:14:42 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 9f231a85004fad080980e80ef881c81d1d5bb60e 8ed101ff01b712dd8b4aaeb645d93d9635ef4b19 --extensions h -- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index a5566d6525..f8c1cca885 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -601,10 +601,10 @@ struct __sanitizer_siginfo_pad {
#if SANITIZER_LINUX
# define SANITIZER_HAS_SIGINFO 1
union __sanitizer_siginfo {
-# ifdef __clang__
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
-# endif
+# ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
+# endif
struct {
int si_signo;
# if SANITIZER_MIPS
@@ -615,9 +615,9 @@ union __sanitizer_siginfo {
int si_code;
# endif
};
-# ifdef __clang__
-# pragma clang diagnostic pop
-# endif
+# ifdef __clang__
+# pragma clang diagnostic pop
+# endif
__sanitizer_siginfo_pad pad;
};
#else
``````````
</details>
https://github.com/llvm/llvm-project/pull/120314
More information about the llvm-commits
mailing list