Skip to content

Commit 179cc20

Browse files
committed
[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.
1 parent 9fbde32 commit 179cc20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcxx/include/__type_traits/invoke.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
6565
#if __has_builtin(__builtin_invoke)
6666

6767
template <class... _Args>
68-
using __invoke_result_t = decltype(__builtin_invoke(std::declval<_Args>()...));
68+
using __invoke_result_t _LIBCPP_NODEBUG = decltype(__builtin_invoke(std::declval<_Args>()...));
6969

7070
template <class, class... _Args>
7171
struct __invoke_result_impl {};
@@ -76,7 +76,7 @@ struct __invoke_result_impl<__void_t<__invoke_result_t<_Args...> >, _Args...> {
7676
};
7777

7878
template <class... _Args>
79-
using __invoke_result = __invoke_result_impl<void, _Args...>;
79+
using __invoke_result _LIBCPP_NODEBUG = __invoke_result_impl<void, _Args...>;
8080

8181
template <class... _Args>
8282
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __invoke_result_t<_Args...> __invoke(_Args&&... __args)

0 commit comments

Comments
 (0)