From cca72fc98657c734c6da609157077acf99161385 Mon Sep 17 00:00:00 2001 From: Domagoj Saric Date: Mon, 14 Oct 2024 00:18:26 +0200 Subject: [PATCH] Clang: silenced 'expected' ubsan warnings. --- include/psi/vm/containers/b+tree.hpp | 1 + src/containers/b+tree.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/include/psi/vm/containers/b+tree.hpp b/include/psi/vm/containers/b+tree.hpp index a6dc49f..b5d32c3 100644 --- a/include/psi/vm/containers/b+tree.hpp +++ b/include/psi/vm/containers/b+tree.hpp @@ -390,6 +390,7 @@ class bptree_base::base_random_access_iterator : public base_iterator public: constexpr base_random_access_iterator() noexcept = default; + [[ clang::no_sanitize( "unsigned-integer-overflow" ) ]] difference_type operator-( base_random_access_iterator const & other ) const noexcept { return static_cast( this->index_ - other.index_ ); } base_random_access_iterator & operator+=( difference_type n ) noexcept; diff --git a/src/containers/b+tree.cpp b/src/containers/b+tree.cpp index 0db01fe..7d766a9 100644 --- a/src/containers/b+tree.cpp +++ b/src/containers/b+tree.cpp @@ -172,6 +172,7 @@ bptree_base::base_iterator::operator++() noexcept } return *this; } +[[ clang::no_sanitize( "implicit-conversion" ) ]] bptree_base::base_iterator & bptree_base::base_iterator::operator--() noexcept {