Skip to content

Commit

Permalink
Changed _Unfancy_maybe_null() to _Unfancy() (microsoft#2508)
Browse files Browse the repository at this point in the history
Co-authored-by: Casey Carter <[email protected]>
  • Loading branch information
DadTech and CaseyCarter authored Feb 1, 2022
1 parent c6df0b0 commit b11945b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions stl/inc/vector
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,11 @@ private:

static _CONSTEXPR20 void _Apply_annotation(
pointer _First_, pointer _End_, pointer _Old_last_, pointer _New_last_) noexcept {
_STL_INTERNAL_CHECK(_First_ != nullptr);
_STL_INTERNAL_CHECK(_End_ != nullptr);
_STL_INTERNAL_CHECK(_Old_last_ != nullptr);
_STL_INTERNAL_CHECK(_New_last_ != nullptr);

#if _HAS_CXX20
if (_STD is_constant_evaluated()) {
return;
Expand All @@ -560,10 +565,10 @@ private:
return;
}

const auto _First = reinterpret_cast<const char*>(_Unfancy_maybe_null(_First_));
const auto _End = reinterpret_cast<const char*>(_Unfancy_maybe_null(_End_));
const auto _Old_last = reinterpret_cast<const char*>(_Unfancy_maybe_null(_Old_last_));
const auto _New_last = reinterpret_cast<const char*>(_Unfancy_maybe_null(_New_last_));
const auto _First = reinterpret_cast<const char*>(_Unfancy(_First_));
const auto _End = reinterpret_cast<const char*>(_Unfancy(_End_));
const auto _Old_last = reinterpret_cast<const char*>(_Unfancy(_Old_last_));
const auto _New_last = reinterpret_cast<const char*>(_Unfancy(_New_last_));
if constexpr (_Has_minimum_allocation_alignment<vector>) {
__sanitizer_annotate_contiguous_container(_First, _End, _Old_last, _New_last);
} else {
Expand Down

0 comments on commit b11945b

Please sign in to comment.