[Instrumentation] Use std::clamp (NFC)
authorKazu Hirata <kazu@google.com>
Mon, 29 Aug 2022 06:28:57 +0000 (23:28 -0700)
committerKazu Hirata <kazu@google.com>
Mon, 29 Aug 2022 06:28:57 +0000 (23:28 -0700)
commit2ad7fd3ac7af15de84713d0e81fc7eeffd320aad
treecafaeda443d32df00c6e98b3f7bd5b0377d79eca
parenteb438c80dfc452edea1816ea6660fc42f9fc3c7c
[Instrumentation] Use std::clamp (NFC)

The use of std::clamp should be safe here.  MinRZ is at most 32, while
kMaxRZ is 1 << 18, so we have MinRZ <= kMaxRZ, avoiding the undefind
behavior of std::clamp.
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp