From: Vitaly Buka Date: Fri, 2 Jun 2023 21:25:11 +0000 (-0700) Subject: [NFC][sanitizer] Delegate ArrayRef constructors X-Git-Tag: upstream/17.0.6~6319 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c42e555dc2b2df45027df62a28314446802cd8b7;p=platform%2Fupstream%2Fllvm.git [NFC][sanitizer] Delegate ArrayRef constructors --- diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.h b/compiler-rt/lib/sanitizer_common/sanitizer_common.h index 358878e..302b443 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h @@ -1083,10 +1083,10 @@ template class ArrayRef { public: ArrayRef() {} - ArrayRef(T *begin, T *end) : begin_(begin), end_(end) {} + ArrayRef(const T *begin, const T *end) : begin_(begin), end_(end) {} template - ArrayRef(const C &src) : begin_(src.data()), end_(src.data() + src.size()) {} + ArrayRef(const C &src) : ArrayRef(src.data(), src.data() + src.size()) {} const T *begin() const { return begin_; } const T *end() const { return end_; }