aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/pop_heap.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-01-09 20:00:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-04-06 20:13:28 +0000
commit1db9f3b21e39176dd5b67cf8ac378633b172463e (patch)
tree71bca5bd62db6368f0738c961b2d87e14c8cb602 /contrib/llvm-project/libcxx/include/__algorithm/pop_heap.h
parent412fa3436f0d1fe4a7e5e3b66783aa40f599125e (diff)
parentaca2e42c67292825f835f094eb0c4df5ce6013db (diff)
downloadsrc-1db9f3b21e39176dd5b67cf8ac378633b172463e.tar.gz
src-1db9f3b21e39176dd5b67cf8ac378633b172463e.zip
Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde. PR: 276104 MFC after: 1 month
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/pop_heap.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/pop_heap.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/pop_heap.h b/contrib/llvm-project/libcxx/include/__algorithm/pop_heap.h
index a93a9875f705..798a1d09934b 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/pop_heap.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/pop_heap.h
@@ -36,7 +36,8 @@ __pop_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Compare& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
- _LIBCPP_ASSERT_UNCATEGORIZED(__len > 0, "The heap given to pop_heap must be non-empty");
+ // Calling `pop_heap` on an empty range is undefined behavior, but in practice it will be a no-op.
+ _LIBCPP_ASSERT_PEDANTIC(__len > 0, "The heap given to pop_heap must be non-empty");
__comp_ref_type<_Compare> __comp_ref = __comp;