[compiler-rt] 52d1cda - [test][asan] Don't use field designators
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 23:47:30 PDT 2023
Author: Vitaly Buka
Date: 2023-08-15T23:47:15-07:00
New Revision: 52d1cdadbae8415d1e61982a03694afb2e8c6459
URL: https://github.com/llvm/llvm-project/commit/52d1cdadbae8415d1e61982a03694afb2e8c6459
DIFF: https://github.com/llvm/llvm-project/commit/52d1cdadbae8415d1e61982a03694afb2e8c6459.diff
LOG: [test][asan] Don't use field designators
Darwin and Linux use a different fields order, causing
"warning: ISO C++ requires field designators to be specified in declaration order".
Added:
Modified:
compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp b/compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp
index 35fd806f50a4a2..82ad64eef36c1a 100644
--- a/compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp
@@ -40,11 +40,10 @@ static void Handler(int signo) {
void *Thread(void *arg) {
fprintf(stderr, "Thread Frame:%p\n", __builtin_frame_address(0));
- stack_t stack = {
- .ss_sp = arg,
- .ss_flags = 0,
- .ss_size = kStackSize,
- };
+ stack_t stack = {};
+ stack.ss_sp = arg;
+ stack.ss_flags = 0;
+ stack.ss_size = kStackSize;
assert(sigaltstack(&stack, nullptr) == 0);
struct sigaction sa = {};
More information about the llvm-commits
mailing list