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.
Details
Details
- Reviewers
Mordante - Group Reviewers
Restricted Project - Commits
- rGcd34e89cfabb: [libc++][NFC] Remove __has_keyword
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/__config | ||
---|---|---|
1155 | Why is this NFC? |
libcxx/include/__config | ||
---|---|---|
1155 | Because this is always false for GCC and always true for Clang. |
libcxx/include/__config | ||
---|---|---|
1155 | This is not NFC: -std=gnu++98 -pedantic-errors has this evaluate to false for Clang. |
Comment Actions
This causes #include <algorithm> to fail with -std=gnu++98 -pedantic-errors:
$ clang++ -xc++ -<<<'#include <algorithm>' -std=gnu++98 -pedantic-errors 2>&1 | sed 's#/.*/bin#/bin#;' | head -n 20 In file included from <stdin>:1: In file included from /bin/../include/c++/v1/algorithm:1811: In file included from /bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h:12: In file included from /bin/../include/c++/v1/__algorithm/pstl_find.h:14: In file included from /bin/../include/c++/v1/__algorithm/pstl_backend.h:12: In file included from /bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h:49: In file included from /bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h:15: In file included from /bin/../include/c++/v1/__atomic/atomic.h:12: In file included from /bin/../include/c++/v1/__atomic/atomic_base.h:12: In file included from /bin/../include/c++/v1/__atomic/atomic_sync.h:12: In file included from /bin/../include/c++/v1/__atomic/contention_t.h:12: /bin/../include/c++/v1/__atomic/cxx_atomic_impl.h:816:28: error: no template named '__cxx_atomic_base_impl' 816 | typename _Base = __cxx_atomic_base_impl<_Tp> > | ^ In file included from <stdin>:1: In file included from /bin/../include/c++/v1/algorithm:1811: In file included from /bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h:12: In file included from /bin/../include/c++/v1/__algorithm/pstl_find.h:14: In file included from /bin/../include/c++/v1/__algorithm/pstl_backend.h:12: In file included from /bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h:49: Return: 0x00:0 Thu Sep 7 14:34:31 2023 EDT
Comment Actions
Thanks! This should at least not be NFC. Since it breaks things I think we should abandon this patch.
At least the new information should be taken into account for the review.
Why is this NFC?