summaryrefslogtreecommitdiff
path: root/libcxx/include/deque
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/deque')
-rw-r--r--libcxx/include/deque32
1 files changed, 21 insertions, 11 deletions
diff --git a/libcxx/include/deque b/libcxx/include/deque
index b5d094dc415d..eabcc7bd0e3c 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -440,7 +440,7 @@ public:
}
static _LIBCPP_HIDE_FROM_ABI _Iterator __compose(__segment_iterator __segment, __local_iterator __local) {
- if (__local == __end(__segment)) {
+ if (__segment && __local == __end(__segment)) {
++__segment;
return _Iterator(__segment, *__segment);
}
@@ -967,12 +967,18 @@ public:
// For more details, see the "Using libc++" documentation page or
// the documentation for __sanitizer_annotate_contiguous_container.
_LIBCPP_HIDE_FROM_ABI void __annotate_double_ended_contiguous_container(
- [[__maybe_unused__]] const void* __beg,
- [[__maybe_unused__]] const void* __end,
- [[__maybe_unused__]] const void* __old_con_beg,
- [[__maybe_unused__]] const void* __old_con_end,
- [[__maybe_unused__]] const void* __new_con_beg,
- [[__maybe_unused__]] const void* __new_con_end) const {
+ const void* __beg,
+ const void* __end,
+ const void* __old_con_beg,
+ const void* __old_con_end,
+ const void* __new_con_beg,
+ const void* __new_con_end) const {
+ (void)__beg;
+ (void)__end;
+ (void)__old_con_beg;
+ (void)__old_con_end;
+ (void)__new_con_beg;
+ (void)__new_con_end;
#ifndef _LIBCPP_HAS_NO_ASAN
if (__beg != nullptr && __asan_annotate_container_with_allocator<_Allocator>::value)
__sanitizer_annotate_double_ended_contiguous_container(
@@ -982,10 +988,14 @@ public:
_LIBCPP_HIDE_FROM_ABI
void __annotate_from_to(
- [[__maybe_unused__]] size_type __beg,
- [[__maybe_unused__]] size_type __end,
- [[__maybe_unused__]] __asan_annotation_type __annotation_type,
- [[__maybe_unused__]] __asan_annotation_place __place) const _NOEXCEPT {
+ size_type __beg,
+ size_type __end,
+ __asan_annotation_type __annotation_type,
+ __asan_annotation_place __place) const _NOEXCEPT {
+ (void)__beg;
+ (void)__end;
+ (void)__annotation_type;
+ (void)__place;
#ifndef _LIBCPP_HAS_NO_ASAN
// __beg - index of the first item to annotate
// __end - index behind the last item to annotate (so last item + 1)