[compiler-rt] [sanitizer-common] sanitizer_array_ref_test should not require C++17 (PR #161252)
Andrew Haberlandt via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 11:34:11 PDT 2025
https://github.com/ndrewh updated https://github.com/llvm/llvm-project/pull/161252
>From d0f4c614b7b32bcf76d3b5f2d2faece72d43c835 Mon Sep 17 00:00:00 2001
From: Andrew Haberlandt <ahaberlandt at apple.com>
Date: Mon, 29 Sep 2025 11:04:16 -0700
Subject: [PATCH] [sanitizer-common] sanitizer_common unit tests need
-std=c++17
Currently, sanitizer_array_ref_test requires -std=c++17 or newer,
due to is_trivially_copyable_v. This adds -std=c++17 to the
list of CFLAGS used for compiling sanitizer_common tests.
---
compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
index 55c7d665e639f..f79cd235fdca2 100644
--- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
@@ -78,6 +78,7 @@ set(SANITIZER_TEST_CFLAGS_COMMON
-O2
-Werror=sign-compare
-Wno-gnu-zero-variadic-macro-arguments
+ -std=c++17
)
set(SANITIZER_TEST_LINK_FLAGS_COMMON
More information about the llvm-commits
mailing list