mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 18:16:42 +00:00
[libc++] __uglify [[clang::noescape]]
(#113280)
Identifiers `clang` and `noescape` are not reserved by the C++ standard, so perhaps we need to use the equivalent reserved forms. Also changes the occurrences of that attribute to a macro, following the convention for `[[_Clang::__lifetimebound__]]`. Addresses https://github.com/llvm/llvm-project/pull/91651#discussion_r1807852646.
This commit is contained in:
parent
c4248fa3ed
commit
08159e6e11
@ -37,13 +37,13 @@ struct __from_chars_result {
|
||||
|
||||
template <class _Fp>
|
||||
_LIBCPP_EXPORTED_FROM_ABI __from_chars_result<_Fp> __from_chars_floating_point(
|
||||
[[clang::noescape]] const char* __first, [[clang::noescape]] const char* __last, chars_format __fmt);
|
||||
_LIBCPP_NOESCAPE const char* __first, _LIBCPP_NOESCAPE const char* __last, chars_format __fmt);
|
||||
|
||||
extern template __from_chars_result<float> __from_chars_floating_point(
|
||||
[[clang::noescape]] const char* __first, [[clang::noescape]] const char* __last, chars_format __fmt);
|
||||
_LIBCPP_NOESCAPE const char* __first, _LIBCPP_NOESCAPE const char* __last, chars_format __fmt);
|
||||
|
||||
extern template __from_chars_result<double> __from_chars_floating_point(
|
||||
[[clang::noescape]] const char* __first, [[clang::noescape]] const char* __last, chars_format __fmt);
|
||||
_LIBCPP_NOESCAPE const char* __first, _LIBCPP_NOESCAPE const char* __last, chars_format __fmt);
|
||||
|
||||
template <class _Fp>
|
||||
_LIBCPP_HIDE_FROM_ABI from_chars_result
|
||||
|
@ -1163,6 +1163,12 @@ typedef __char32_t char32_t;
|
||||
# define _LIBCPP_LIFETIMEBOUND
|
||||
# endif
|
||||
|
||||
# if __has_cpp_attribute(_Clang::__noescape__)
|
||||
# define _LIBCPP_NOESCAPE [[_Clang::__noescape__]]
|
||||
# else
|
||||
# define _LIBCPP_NOESCAPE
|
||||
# endif
|
||||
|
||||
# if __has_attribute(__nodebug__)
|
||||
# define _LIBCPP_NODEBUG __attribute__((__nodebug__))
|
||||
# else
|
||||
|
@ -77,13 +77,13 @@ to_chars_result to_chars(char* __first, char* __last, long double __value, chars
|
||||
|
||||
template <class _Fp>
|
||||
__from_chars_result<_Fp> __from_chars_floating_point(
|
||||
[[clang::noescape]] const char* __first, [[clang::noescape]] const char* __last, chars_format __fmt) {
|
||||
_LIBCPP_NOESCAPE const char* __first, _LIBCPP_NOESCAPE const char* __last, chars_format __fmt) {
|
||||
return std::__from_chars_floating_point_impl<_Fp>(__first, __last, __fmt);
|
||||
}
|
||||
|
||||
template __from_chars_result<float> __from_chars_floating_point(
|
||||
[[clang::noescape]] const char* __first, [[clang::noescape]] const char* __last, chars_format __fmt);
|
||||
_LIBCPP_NOESCAPE const char* __first, _LIBCPP_NOESCAPE const char* __last, chars_format __fmt);
|
||||
|
||||
template __from_chars_result<double> __from_chars_floating_point(
|
||||
[[clang::noescape]] const char* __first, [[clang::noescape]] const char* __last, chars_format __fmt);
|
||||
_LIBCPP_NOESCAPE const char* __first, _LIBCPP_NOESCAPE const char* __last, chars_format __fmt);
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
Loading…
x
Reference in New Issue
Block a user