[compiler-rt] [ubsan][test] Enable Misc/Linux tests on all Posix systems (PR #111497)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 01:16:10 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 a3a253d3c7780977077dd46493917b1949c0166d a5868ab1f3d4329efa767d0b3fd6a35b3d93d864 --extensions cpp -- compiler-rt/test/ubsan/TestCases/Misc/Posix/diag-stacktrace.cpp compiler-rt/test/ubsan/TestCases/Misc/Posix/print_stack_trace.cpp compiler-rt/test/ubsan/TestCases/Misc/Posix/sigaction.cpp compiler-rt/test/ubsan/TestCases/Misc/Posix/static-link.cpp compiler-rt/test/ubsan/TestCases/Misc/Posix/ubsan_options.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/test/ubsan/TestCases/Misc/Posix/print_stack_trace.cpp b/compiler-rt/test/ubsan/TestCases/Misc/Posix/print_stack_trace.cpp
index 93c6bd66e1..66907be0bb 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/Posix/print_stack_trace.cpp
+++ b/compiler-rt/test/ubsan/TestCases/Misc/Posix/print_stack_trace.cpp
@@ -10,9 +10,7 @@
#include <sanitizer/common_interface_defs.h>
-static inline void FooBarBaz() {
- __sanitizer_print_stack_trace();
-}
+static inline void FooBarBaz() { __sanitizer_print_stack_trace(); }
int main() {
FooBarBaz();
diff --git a/compiler-rt/test/ubsan/TestCases/Misc/Posix/ubsan_options.cpp b/compiler-rt/test/ubsan/TestCases/Misc/Posix/ubsan_options.cpp
index 284b4ba0ab..f8018a3b84 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/Posix/ubsan_options.cpp
+++ b/compiler-rt/test/ubsan/TestCases/Misc/Posix/ubsan_options.cpp
@@ -6,13 +6,10 @@
#include <stdint.h>
-extern "C" const char *__ubsan_default_options() {
- return "halt_on_error=1";
-}
+extern "C" const char *__ubsan_default_options() { return "halt_on_error=1"; }
int main() {
(void)(uint64_t(10000000000000000000ull) + uint64_t(9000000000000000000ull));
// CHECK: ubsan_options.cpp:[[@LINE-1]]:44: runtime error: unsigned integer overflow
return 0;
}
-
``````````
</details>
https://github.com/llvm/llvm-project/pull/111497
More information about the llvm-commits
mailing list