Skip to content

Commit

Permalink
Clang: silenced 'expected' ubsan warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
psiha committed Oct 13, 2024
1 parent 07d8ba7 commit cca72fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/psi/vm/containers/b+tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<difference_type>( this->index_ - other.index_ ); }

base_random_access_iterator & operator+=( difference_type n ) noexcept;
Expand Down
1 change: 1 addition & 0 deletions src/containers/b+tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit cca72fc

Please sign in to comment.