[compiler-rt] 09ec58c - [test][asan] Simplify a few expressions
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 15:27:17 PST 2022
Author: Vitaly Buka
Date: 2022-11-27T15:26:24-08:00
New Revision: 09ec58c8d649cd7e9c7aaadb20d685c7a572f54b
URL: https://github.com/llvm/llvm-project/commit/09ec58c8d649cd7e9c7aaadb20d685c7a572f54b
DIFF: https://github.com/llvm/llvm-project/commit/09ec58c8d649cd7e9c7aaadb20d685c7a572f54b.diff
LOG: [test][asan] Simplify a few expressions
Added:
Modified:
compiler-rt/test/asan/TestCases/contiguous_container.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/asan/TestCases/contiguous_container.cpp b/compiler-rt/test/asan/TestCases/contiguous_container.cpp
index ee56f2a9afe3..44e419e9ebbe 100644
--- a/compiler-rt/test/asan/TestCases/contiguous_container.cpp
+++ b/compiler-rt/test/asan/TestCases/contiguous_container.cpp
@@ -49,11 +49,11 @@ void TestContainer(size_t capacity, size_t off_begin, bool poison_buffer) {
__sanitizer_annotate_contiguous_container(st_beg, st_end, old_end, end);
char *cur = buffer;
- for (; cur < buffer + RoundDown(off_begin); ++cur)
+ for (; cur < RoundDown(st_beg); ++cur)
assert(__asan_address_is_poisoned(cur) == poison_buffer);
// The prefix of the first incomplete granule can switch from poisoned to
// unpoisoned but not otherwise.
- for (; cur < buffer + off_begin; ++cur)
+ for (; cur < st_beg; ++cur)
assert(poison_buffer || !__asan_address_is_poisoned(cur));
for (; cur < end; ++cur)
assert(!__asan_address_is_poisoned(cur));
More information about the llvm-commits
mailing list