Skip to content

Commit 46a5de6

Browse files
authored
[libc++] Remove a few __has_foo defines in __config (#90511)
All the compilers we support implement those macros or builtins, so it's not useful to have a fallback to 0 when they're not implemented.
1 parent e020e28 commit 46a5de6

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

libcxx/include/__config

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -334,26 +334,16 @@ _LIBCPP_HARDENING_MODE_DEBUG
334334
# define _LIBCPP_CXX03_LANG
335335
# endif
336336

337-
# ifndef __has_attribute
338-
# define __has_attribute(__x) 0
339-
# endif
340-
341-
# ifndef __has_builtin
342-
# define __has_builtin(__x) 0
343-
# endif
344-
337+
// TODO: Remove once we switch to GCC 14
345338
# ifndef __has_extension
346339
# define __has_extension(__x) 0
347340
# endif
348341

342+
// TODO: Remove once we switch to GCC 14
349343
# ifndef __has_feature
350344
# define __has_feature(__x) 0
351345
# endif
352346

353-
# ifndef __has_cpp_attribute
354-
# define __has_cpp_attribute(__x) 0
355-
# endif
356-
357347
# ifndef __has_constexpr_builtin
358348
# define __has_constexpr_builtin(x) 0
359349
# endif
@@ -375,10 +365,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
375365

376366
# define __has_keyword(__x) !(__is_identifier(__x))
377367

378-
# ifndef __has_include
379-
# define __has_include(...) 0
380-
# endif
381-
382368
# ifndef __has_warning
383369
# define __has_warning(...) 0
384370
# endif

0 commit comments

Comments
 (0)