Skip to content

Commit f3d1611

Browse files
aganeajroelofs
authored andcommitted
[compiler-rt][asan] Silence warning
This would silence: ``` [2003/2029] Generating ASAN_NOINST_TEST_OBJECTS.asan_noinst_test.cpp.x86_64-inline.o In file included from C:/git/llvm-project/compiler-rt/lib/asan/tests/asan_noinst_test.cpp:24: In file included from C:/git/llvm-project/compiler-rt/lib/asan\asan_allocator.h:20: In file included from C:/git/llvm-project/compiler-rt/lib\sanitizer_common/sanitizer_allocator.h:74: C:/git/llvm-project/compiler-rt/lib\sanitizer_common\sanitizer_allocator_primary64.h:639:54: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] 639 | static_assert(kRegionSize >= SizeClassMap::kMaxSize); | ^ | , "" 1 warning generated. ``` (cherry picked from commit d58fb40)
1 parent aa956b0 commit f3d1611

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,8 @@ class SizeClassAllocator64 {
636636
}
637637
uptr SpaceEnd() const { return SpaceBeg() + kSpaceSize; }
638638
// kRegionSize should be able to satisfy the largest size class.
639-
static_assert(kRegionSize >= SizeClassMap::kMaxSize);
639+
static_assert(kRegionSize >= SizeClassMap::kMaxSize,
640+
"Region size exceed largest size");
640641
// kRegionSize must be <= 2^36, see CompactPtrT.
641642
COMPILER_CHECK((kRegionSize) <= (1ULL << (SANITIZER_WORDSIZE / 2 + 4)));
642643
// Call mmap for user memory with at least this size.

0 commit comments

Comments
 (0)