[all-commits] [llvm/llvm-project] ba8751: [libc++][RFC] Always define internal feature test ...
Nikolas Klauser via All-commits
all-commits at lists.llvm.org
Sat Oct 12 00:50:14 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ba87515fea90b5d55836a8e3be63a7e683ce299d
https://github.com/llvm/llvm-project/commit/ba87515fea90b5d55836a8e3be63a7e683ce299d
Author: Nikolas Klauser <nikolasklauser at berlin.de>
Date: 2024-10-12 (Sat, 12 Oct 2024)
Changed paths:
M libcxx/include/__atomic/aliases.h
M libcxx/include/__atomic/atomic_lock_free.h
M libcxx/include/__bit/byteswap.h
M libcxx/include/__bit/countl.h
M libcxx/include/__charconv/tables.h
M libcxx/include/__charconv/to_chars_base_10.h
M libcxx/include/__charconv/to_chars_integral.h
M libcxx/include/__charconv/traits.h
M libcxx/include/__chrono/exception.h
M libcxx/include/__chrono/file_clock.h
M libcxx/include/__condition_variable/condition_variable.h
M libcxx/include/__config
M libcxx/include/__configuration/availability.h
M libcxx/include/__configuration/language.h
M libcxx/include/__debug_utils/sanitizers.h
M libcxx/include/__exception/exception_ptr.h
M libcxx/include/__exception/nested_exception.h
M libcxx/include/__expected/expected.h
M libcxx/include/__filesystem/filesystem_error.h
M libcxx/include/__filesystem/path.h
M libcxx/include/__filesystem/u8path.h
M libcxx/include/__format/format_arg.h
M libcxx/include/__format/format_arg_store.h
M libcxx/include/__format/format_context.h
M libcxx/include/__format/format_error.h
M libcxx/include/__format/format_functions.h
M libcxx/include/__format/formatter_integer.h
M libcxx/include/__functional/function.h
M libcxx/include/__functional/hash.h
M libcxx/include/__fwd/string.h
M libcxx/include/__fwd/string_view.h
M libcxx/include/__hash_table
M libcxx/include/__iterator/counted_iterator.h
M libcxx/include/__locale
M libcxx/include/__memory/addressof.h
M libcxx/include/__memory/aligned_alloc.h
M libcxx/include/__memory/shared_ptr.h
M libcxx/include/__memory/uninitialized_algorithms.h
M libcxx/include/__memory/unique_temporary_buffer.h
M libcxx/include/__mutex/mutex.h
M libcxx/include/__ostream/basic_ostream.h
M libcxx/include/__ostream/print.h
M libcxx/include/__pstl/backends/libdispatch.h
M libcxx/include/__random/is_valid.h
M libcxx/include/__random/linear_congruential_engine.h
M libcxx/include/__random/log2.h
M libcxx/include/__split_buffer
M libcxx/include/__string/char_traits.h
M libcxx/include/__string/constexpr_c_functions.h
M libcxx/include/__system_error/system_error.h
M libcxx/include/__type_traits/is_integral.h
M libcxx/include/__type_traits/is_pointer.h
M libcxx/include/__type_traits/is_scalar.h
M libcxx/include/__type_traits/is_signed_integer.h
M libcxx/include/__type_traits/is_unsigned_integer.h
M libcxx/include/__type_traits/make_32_64_or_128_bit.h
M libcxx/include/__type_traits/make_signed.h
M libcxx/include/__type_traits/make_unsigned.h
M libcxx/include/__type_traits/promote.h
M libcxx/include/__utility/convert_to_integral.h
M libcxx/include/__utility/exception_guard.h
M libcxx/include/any
M libcxx/include/atomic
M libcxx/include/cuchar
M libcxx/include/deque
M libcxx/include/experimental/__simd/utility.h
M libcxx/include/forward_list
M libcxx/include/fstream
M libcxx/include/future
M libcxx/include/iomanip
M libcxx/include/ios
M libcxx/include/iosfwd
M libcxx/include/istream
M libcxx/include/list
M libcxx/include/locale
M libcxx/include/new
M libcxx/include/optional
M libcxx/include/regex
M libcxx/include/sstream
M libcxx/include/stdatomic.h
M libcxx/include/stdexcept
M libcxx/include/string
M libcxx/include/string_view
M libcxx/include/syncstream
M libcxx/include/typeinfo
M libcxx/include/valarray
M libcxx/include/variant
M libcxx/include/vector
M libcxx/include/version
M libcxx/modules/std.compat/cuchar.inc
M libcxx/modules/std.cppm.in
M libcxx/modules/std/atomic.inc
M libcxx/modules/std/cuchar.inc
M libcxx/modules/std/iosfwd.inc
M libcxx/modules/std/memory.inc
M libcxx/modules/std/string.inc
M libcxx/modules/std/string_view.inc
M libcxx/src/condition_variable_destructor.cpp
M libcxx/src/filesystem/error.h
M libcxx/src/filesystem/format_string.h
M libcxx/src/filesystem/int128_builtins.cpp
M libcxx/src/future.cpp
M libcxx/src/ios.cpp
M libcxx/src/locale.cpp
M libcxx/src/memory_resource.cpp
M libcxx/src/mutex_destructor.cpp
M libcxx/src/new.cpp
M libcxx/src/new_helpers.cpp
M libcxx/src/ostream.cpp
M libcxx/src/ryu/d2s.cpp
M libcxx/src/stdexcept.cpp
M libcxx/src/support/runtime/exception_fallback.ipp
M libcxx/src/support/runtime/exception_msvc.ipp
M libcxx/src/system_error.cpp
M libcxx/test/libcxx/concepts/concepts.arithmetic/__libcpp_integer.compile.pass.cpp
M libcxx/test/libcxx/concepts/concepts.arithmetic/__libcpp_signed_integer.compile.pass.cpp
M libcxx/test/libcxx/concepts/concepts.arithmetic/__libcpp_unsigned_integer.compile.pass.cpp
M libcxx/test/libcxx/diagnostics/new.nodiscard.verify.cpp
M libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp
M libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp
M libcxx/test/libcxx/utilities/expected/expected.expected/value.observers.verify.cpp
M libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
M libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/alg.pass.cpp
M libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp
M libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
M libcxx/test/std/strings/c.strings/no_c8rtomb_mbrtoc8.verify.cpp
M libcxx/test/support/test.support/make_string_header.pass.cpp
M libcxx/test/support/test_macros.h
M libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
A libcxx/test/tools/clang_tidy_checks/internal_ftm_use.cpp
A libcxx/test/tools/clang_tidy_checks/internal_ftm_use.hpp
M libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp
M libcxx/utils/generate_feature_test_macro_components.py
M libcxx/utils/libcxx/header_information.py
M libcxxabi/src/fallback_malloc.cpp
M libcxxabi/src/stdlib_new_delete.cpp
Log Message:
-----------
[libc++][RFC] Always define internal feature test macros (#89178)
Currently, the library-internal feature test macros are only defined if
the feature is not available, and always have the prefix
`_LIBCPP_HAS_NO_`. This patch changes that, so that they are always
defined and have the prefix `_LIBCPP_HAS_` instead. This changes the
canonical use of these macros to `#if _LIBCPP_HAS_FEATURE`, which means
that using an undefined macro (e.g. due to a missing include) is
diagnosed now. While this is rather unlikely currently, a similar change
in `<__configuration/availability.h>` caught a few bugs. This also
improves readability, since it removes the double-negation of `#ifndef
_LIBCPP_HAS_NO_FEATURE`.
The current patch only touches the macros defined in `<__config>`. If
people are happy with this approach, I'll make a follow-up PR to also
change the macros defined in `<__config_site>`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list