Skip to content

Commit f4a65d6

Browse files
author
Advenam Tacet
committed
Remove __asan_short_string_is_annotated
1 parent 16f475a commit f4a65d6

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

libcxx/include/string

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,38 +1896,33 @@ private:
18961896
#endif
18971897
}
18981898

1899-
// ASan: short string is poisoned if and only if this function returns true.
1900-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __asan_short_string_is_annotated() const _NOEXCEPT {
1901-
return !__libcpp_is_constant_evaluated();
1902-
}
1903-
19041899
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_new(size_type __current_size) const _NOEXCEPT {
19051900
(void) __current_size;
19061901
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
1907-
if (!__libcpp_is_constant_evaluated() && (__asan_short_string_is_annotated() || __is_long()))
1902+
if (!__libcpp_is_constant_evaluated())
19081903
__annotate_contiguous_container(data() + capacity() + 1, data() + __current_size + 1);
19091904
#endif
19101905
}
19111906

19121907
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_delete() const _NOEXCEPT {
19131908
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
1914-
if (!__libcpp_is_constant_evaluated() && (__asan_short_string_is_annotated() || __is_long()))
1909+
if (!__libcpp_is_constant_evaluated())
19151910
__annotate_contiguous_container(data() + size() + 1, data() + capacity() + 1);
19161911
#endif
19171912
}
19181913

19191914
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_increase(size_type __n) const _NOEXCEPT {
19201915
(void) __n;
19211916
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
1922-
if (!__libcpp_is_constant_evaluated() && (__asan_short_string_is_annotated() || __is_long()))
1917+
if (!__libcpp_is_constant_evaluated())
19231918
__annotate_contiguous_container(data() + size() + 1, data() + size() + 1 + __n);
19241919
#endif
19251920
}
19261921

19271922
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_shrink(size_type __old_size) const _NOEXCEPT {
19281923
(void) __old_size;
19291924
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
1930-
if (!__libcpp_is_constant_evaluated() && (__asan_short_string_is_annotated() || __is_long()))
1925+
if (!__libcpp_is_constant_evaluated())
19311926
__annotate_contiguous_container(data() + __old_size + 1, data() + size() + 1);
19321927
#endif
19331928
}

0 commit comments

Comments
 (0)