[compiler-rt] c42e555 - [NFC][sanitizer] Delegate ArrayRef constructors
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 12:51:11 PDT 2023
Could add some test coverage for that minor fix for the ArrayRef(constT*,
constT*) ctor.
On Fri, Jun 2, 2023 at 2:32 PM Vitaly Buka via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
>
> Author: Vitaly Buka
> Date: 2023-06-02T14:32:03-07:00
> New Revision: c42e555dc2b2df45027df62a28314446802cd8b7
>
> URL:
> https://github.com/llvm/llvm-project/commit/c42e555dc2b2df45027df62a28314446802cd8b7
> DIFF:
> https://github.com/llvm/llvm-project/commit/c42e555dc2b2df45027df62a28314446802cd8b7.diff
>
> LOG: [NFC][sanitizer] Delegate ArrayRef constructors
>
> Added:
>
>
> Modified:
> compiler-rt/lib/sanitizer_common/sanitizer_common.h
>
> Removed:
>
>
>
>
> ################################################################################
> diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.h
> b/compiler-rt/lib/sanitizer_common/sanitizer_common.h
> index 358878e81c948..302b4437d64bd 100644
> --- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h
> +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h
> @@ -1083,10 +1083,10 @@ template <typename T>
> 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 <typename C>
> - 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_; }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230605/34232bb7/attachment.html>
More information about the llvm-commits
mailing list