[compiler-rt] [sanitizer] Replace ALIGNED with alignas (PR #98958)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 13:41:36 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 148d90729e9fa132f170ba0627bcfb9ee90a0f38 6e393e84c1145693d12c0bcfef1a6c0b44855aac --extensions cpp,h -- compiler-rt/lib/asan/asan_globals_win.cpp compiler-rt/lib/asan/asan_malloc_linux.cpp compiler-rt/lib/asan/asan_report.cpp compiler-rt/lib/asan/asan_suppressions.cpp compiler-rt/lib/asan/asan_thread.cpp compiler-rt/lib/dfsan/dfsan_allocator.h compiler-rt/lib/hwasan/hwasan_allocator.cpp compiler-rt/lib/hwasan/hwasan_thread_list.cpp compiler-rt/lib/lsan/lsan_common.cpp compiler-rt/lib/lsan/lsan_common_linux.cpp compiler-rt/lib/lsan/lsan_thread.cpp compiler-rt/lib/memprof/memprof_thread.cpp compiler-rt/lib/msan/msan.cpp compiler-rt/lib/msan/msan_allocator.h compiler-rt/lib/msan/msan_interceptors.cpp compiler-rt/lib/sanitizer_common/sanitizer_allocator.cpp compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h compiler-rt/lib/sanitizer_common/sanitizer_atomic.h compiler-rt/lib/ubsan/ubsan_diag.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/asan/asan_globals_win.cpp b/compiler-rt/lib/asan/asan_globals_win.cpp
index 9442cc35d5..208080dfeb 100644
--- a/compiler-rt/lib/asan/asan_globals_win.cpp
+++ b/compiler-rt/lib/asan/asan_globals_win.cpp
@@ -21,7 +21,7 @@ extern "C" alignas(sizeof(__asan_global))
__declspec(allocate(".ASAN$GA")) __asan_global __asan_globals_start = {};
extern "C" alignas(sizeof(__asan_global))
__declspec(allocate(".ASAN$GZ")) __asan_global __asan_globals_end = {};
-#pragma comment(linker, "/merge:.ASAN=.data")
+# pragma comment(linker, "/merge:.ASAN=.data")
static void call_on_globals(void (*hook)(__asan_global *, uptr)) {
__asan_global *start = &__asan_globals_start + 1;
diff --git a/compiler-rt/lib/asan/asan_malloc_linux.cpp b/compiler-rt/lib/asan/asan_malloc_linux.cpp
index 08a63045c4..d0d698ae94 100644
--- a/compiler-rt/lib/asan/asan_malloc_linux.cpp
+++ b/compiler-rt/lib/asan/asan_malloc_linux.cpp
@@ -190,9 +190,15 @@ alignas(32) const MallocDebugK asan_malloc_dispatch_k = {
WRAP(realloc), WRAP(memalign), WRAP(malloc_usable_size)};
alignas(32) const MallocDebugL asan_malloc_dispatch_l = {
- WRAP(calloc), WRAP(free), WRAP(mallinfo),
- WRAP(malloc), WRAP(malloc_usable_size), WRAP(memalign),
- WRAP(posix_memalign), WRAP(pvalloc), WRAP(realloc),
+ WRAP(calloc),
+ WRAP(free),
+ WRAP(mallinfo),
+ WRAP(malloc),
+ WRAP(malloc_usable_size),
+ WRAP(memalign),
+ WRAP(posix_memalign),
+ WRAP(pvalloc),
+ WRAP(realloc),
WRAP(valloc)};
namespace __asan {
``````````
</details>
https://github.com/llvm/llvm-project/pull/98958
More information about the llvm-commits
mailing list