diff options
Diffstat (limited to 'lib/sanitizer_common/sanitizer_ring_buffer.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_ring_buffer.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/sanitizer_common/sanitizer_ring_buffer.h b/lib/sanitizer_common/sanitizer_ring_buffer.h index d15f27fd4a83..2a46e933b75d 100644 --- a/lib/sanitizer_common/sanitizer_ring_buffer.h +++ b/lib/sanitizer_common/sanitizer_ring_buffer.h @@ -1,9 +1,8 @@ //===-- sanitizer_ring_buffer.h ---------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -140,7 +139,7 @@ class CompactRingBuffer { SetNext(next); } - T operator[](uptr Idx) const { + const T &operator[](uptr Idx) const { CHECK_LT(Idx, size()); const T *Begin = (const T *)StartOfStorage(); sptr StorageIdx = Next() - Begin; |