Skip to content

Commit cd34e89

Browse files
committed
[libc++][NFC] Remove __has_keyword
__has_keyword is almost not used anymore. There are only two cases. One can be replaced by __has_builtin and the other seems entirely redundant, so we can remove the definition. Reviewed By: #libc, Mordante Spies: Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D158215
1 parent 3583bf3 commit cd34e89

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

libcxx/include/__config

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,6 @@
362362
# define __has_declspec_attribute(__x) 0
363363
# endif
364364

365-
# define __has_keyword(__x) !(__is_identifier(__x))
366-
367365
# ifndef __has_include
368366
# define __has_include(...) 0
369367
# endif
@@ -1154,7 +1152,7 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
11541152
# define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
11551153
# endif
11561154

1157-
# if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic)
1155+
# if __has_feature(cxx_atomic) || __has_extension(c_atomic)
11581156
# define _LIBCPP_HAS_C_ATOMIC_IMP
11591157
# elif defined(_LIBCPP_COMPILER_GCC)
11601158
# define _LIBCPP_HAS_GCC_ATOMIC_IMP

libcxx/include/tuple

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ class __tuple_leaf
308308

309309
template <class _Tp>
310310
static _LIBCPP_HIDE_FROM_ABI constexpr bool __can_bind_reference() {
311-
#if __has_keyword(__reference_binds_to_temporary)
311+
#if __has_builtin(__reference_binds_to_temporary)
312312
return !__reference_binds_to_temporary(_Hp, _Tp);
313313
#else
314314
return true;

0 commit comments

Comments
 (0)