[libc++] Add missing _LIBCPP_NODEBUG in <__type_traits/invoke.h>
libc++ doesn't run clang-tidy in the bootstrapping build, so it wasn't run when `__builtin_invoke` was introduced. Once libc++ upgrades to a newer clang version, clang-tidy will start to fail due to missing `_LIBCPP_NODEBUG` annotations.
This commit is contained in:
@@ -65,7 +65,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#if __has_builtin(__builtin_invoke)
|
||||
|
||||
template <class... _Args>
|
||||
using __invoke_result_t = decltype(__builtin_invoke(std::declval<_Args>()...));
|
||||
using __invoke_result_t _LIBCPP_NODEBUG = decltype(__builtin_invoke(std::declval<_Args>()...));
|
||||
|
||||
template <class, class... _Args>
|
||||
struct __invoke_result_impl {};
|
||||
@@ -76,7 +76,7 @@ struct __invoke_result_impl<__void_t<__invoke_result_t<_Args...> >, _Args...> {
|
||||
};
|
||||
|
||||
template <class... _Args>
|
||||
using __invoke_result = __invoke_result_impl<void, _Args...>;
|
||||
using __invoke_result _LIBCPP_NODEBUG = __invoke_result_impl<void, _Args...>;
|
||||
|
||||
template <class... _Args>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __invoke_result_t<_Args...> __invoke(_Args&&... __args)
|
||||
|
||||
Reference in New Issue
Block a user