llvm-capstone/libcxx/include
Hristo Hristov 03c19e91e8
[libc++][numeric] P0543R3: Saturation arithmetic (#77967)
Implements: https://wg21.link/P0543R3
- https://eel.is/c++draft/numeric.sat

Additional references:
- Division: https://eel.is/c++draft/expr.mul#4
- Arithmetic conversions: https://eel.is/c++draft/expr.arith.conv#1
- Clang builtins:
https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions

Depends on: https://github.com/llvm/llvm-project/pull/78086

---------

Co-authored-by: Zingam <zingam@outlook.com>
Co-authored-by: Mark de Wever <zar-rpg@xs4all.nl>
2024-01-22 06:57:45 +02:00
..
__algorithm [libc++][hardening] Categorize assertions that produce incorrect results (#77183) 2024-01-20 23:38:02 -08:00
__atomic [libc++] Clang-tidy enable modernize-use-nullptr. 2024-01-21 13:08:18 +01:00
__bit [libc++][hardening] Categorize assertions that produce incorrect results (#77183) 2024-01-20 23:38:02 -08:00
__charconv [libc++][hardening] Categorize more assertions. (#75918) 2024-01-05 16:29:23 -08:00
__chrono [libc++][hardening] Categorize more assertions. (#75918) 2024-01-05 16:29:23 -08:00
__compare [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__concepts [libc++][concepts] Implements concept helper __libcpp_integer (#78086) 2024-01-15 00:00:57 +02:00
__condition_variable [libc++][NFC] Refactor __enable_if return types to defaulted template parameters 2023-09-01 17:52:31 -07:00
__coroutine [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__debug_utils [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__exception [libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI (#74095) 2023-12-04 10:25:14 -05:00
__expected [libc++] Implement LWG3940: std::expected<void, E>::value() also needs E to be copy constructible (#71819) 2024-01-19 10:06:11 +00:00
__filesystem [libc++][hardening] Categorize more assertions. (#75918) 2024-01-05 16:29:23 -08:00
__format [libc++][format] P2637R3: Member visit (std::basic_format_arg) (#76449) 2024-01-21 12:30:25 +02:00
__functional [libc++] Implement ranges::contains (#65148) 2023-12-19 16:34:19 -08:00
__fwd [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__ios [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__iterator [libc++] Clang-tidy enable modernize-use-nullptr. 2024-01-21 13:08:18 +01:00
__locale_dir/locale_base_api [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__math [libc++][NFC] Replace typedefs with using in the math headers 2023-08-03 08:51:50 -07:00
__mdspan [libc++] LWG-4021 "mdspan::is_always_meow() should be noexcept", use LIBCPP_STATIC_ASSERT for noexcept strengthening (#74254) 2023-12-10 11:52:14 +01:00
__memory [libc++][hardening] Categorize assertions that produce incorrect results (#77183) 2024-01-20 23:38:02 -08:00
__memory_resource [libc++] Remove a few transitive includes (#70553) 2023-10-29 18:31:37 +01:00
__mutex [libc++] Replace uses of _VSTD:: by std:: (#74331) 2023-12-05 11:19:15 -05:00
__numeric [libc++][numeric] P0543R3: Saturation arithmetic (#77967) 2024-01-22 06:57:45 +02:00
__random [libc++][hardening] Categorize more assertions. (#75918) 2024-01-05 16:29:23 -08:00
__ranges [libc++] Renames ABI tag. (#78342) 2024-01-18 18:46:46 +01:00
__stop_token [libc++] Implement std::condition_variable_any::wait[_for/until] overloads that take stop_token 2023-09-29 13:50:16 +01:00
__string [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__support [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__system_error [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__thread [libc++][hardening] Categorize more assertions. (#75918) 2024-01-05 16:29:23 -08:00
__tuple [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__type_traits [libc++] Use __datasizeof for __libcpp_datasizeof if available (#72104) 2023-12-24 08:45:25 +01:00
__utility [libc++][utility][NFC] Refactored safe integer cmp_xxxx functions to use the __libcpp_is_integer concept (#78115) 2024-01-16 13:17:59 +02:00
__variant [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
experimental [libc++] <experimental/simd> Add load constructor for class simd/simd_mask (#76610) 2024-01-21 12:48:30 +08:00
ext [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__assert [libc++][hardening] Rework how the assertion handler can be overridden. (#77883) 2024-01-17 18:56:07 -08:00
__availability [libc++][print] Enables it on Apple backdeployment. (#76293) 2024-01-16 19:14:33 +01:00
__bit_reference [libc++] Optimize ranges::count for __bit_iterators 2023-10-06 22:58:41 +02:00
__config [libc++][format] P2637R3: Member visit (std::basic_format_arg) (#76449) 2024-01-21 12:30:25 +02:00
__config_site.in [ASan][libc++] std::basic_string annotations (#72677) 2023-12-13 06:05:34 +01:00
__hash_table [libc++][hardening] Categorize assertions that produce incorrect results (#77183) 2024-01-20 23:38:02 -08:00
__locale [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__mbstate_t.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__node_handle [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__split_buffer [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__std_clang_module [libc++] Remove experimental pmr headers now shipped in mainline (#73172) 2023-11-27 10:54:35 -05:00
__std_mbstate_t.h
__threading_support [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__tree [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
__undef_macros
__verbose_abort [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
algorithm [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (#75259) 2023-12-19 21:57:50 -08:00
any [libc++][any] LWG3305: any_cast<void> (#78215) 2024-01-20 06:08:24 +02:00
array [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
atomic [libc++] Refactor atomic_{unsigned,signed}_lock_free (#73041) 2023-11-22 14:54:40 -05:00
barrier [libc++][hardening] Categorize assertions that produce incorrect results (#77183) 2024-01-20 23:38:02 -08:00
bit [libc++] Fix the signature of std::rotl and std::rotr 2023-08-12 08:46:11 -07:00
bitset [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
cassert
ccomplex
cctype [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
cerrno
cfenv
cfloat
charconv [libc++] Remove a few transitive includes (#70553) 2023-10-29 18:31:37 +01:00
chrono [libc++][NFC] Add a few clang-format annotations (#74352) 2023-12-04 15:17:31 -05:00
cinttypes
ciso646
climits [libc++] Remove libc++'s own <limits.h> (#65472) 2023-10-10 11:06:43 -07:00
clocale
CMakeLists.txt [libc++][numeric] P0543R3: Saturation arithmetic (#77967) 2024-01-22 06:57:45 +02:00
cmath [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
codecvt [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
compare
complex [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
complex.h
concepts [libc++] Fix typo in _LIBCPP_REMOVE_TRANSITIVE_INCLUDES (#78639) 2024-01-21 16:15:46 +01:00
condition_variable [libc++] fix condition_variable_any hangs on stop_request (#77127) 2024-01-20 21:18:44 +00:00
coroutine
csetjmp [libc++] Remove libc++'s own <setjmp.h> header (#68806) 2023-10-12 16:59:04 -07:00
csignal
cstdarg
cstdbool
cstddef [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
cstdint
cstdio [libc++] Remove _LIBCPP_C_HAS_NO_GETS (#77346) 2024-01-10 13:34:03 -05:00
cstdlib [libc++] Fixes disabling wide character. 2023-08-19 19:09:16 +02:00
cstring
ctgmath
ctime
ctype.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
cuchar [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
cwchar
cwctype
deque [ASan][libc++] Optimization of container annotations (#76082) 2023-12-21 17:26:10 -05:00
errno.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
exception
execution
expected [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
fenv.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
filesystem [libc++] Remove a few transitive includes (#70553) 2023-10-29 18:31:37 +01:00
float.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
format [libc++][format] P2637R3: Member visit (std::basic_format_arg) (#76449) 2024-01-21 12:30:25 +02:00
forward_list [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
fstream Reapply "[libc++][streams] P1759R6: Native handles and file streams" (#77190) 2024-01-07 18:01:03 +02:00
functional [libc++] Remove a few transitive includes (#70553) 2023-10-29 18:31:37 +01:00
future [libc++] Improves _LIBCPP_HAS_NO_THREADS guards. (#76624) 2024-01-16 19:13:40 +01:00
initializer_list [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
inttypes.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
iomanip [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
ios [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
iosfwd [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
iostream
istream [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
iterator [libc++] Remove a few transitive includes (#70553) 2023-10-29 18:31:37 +01:00
latch [libc++][hardening] Categorize assertions that produce incorrect results (#77183) 2024-01-20 23:38:02 -08:00
libcxx.imp [libc++][numeric] P0543R3: Saturation arithmetic (#77967) 2024-01-22 06:57:45 +02:00
limits [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
list [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
locale [libc++] Clang-tidy enable modernize-use-nullptr. 2024-01-21 13:08:18 +01:00
locale.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
map [libc++] Fix nolint comment that became useless after running clang-format 2023-12-18 17:49:21 -05:00
math.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
mdspan [libc++] LWG-4021 "mdspan::is_always_meow() should be noexcept", use LIBCPP_STATIC_ASSERT for noexcept strengthening (#74254) 2023-12-10 11:52:14 +01:00
memory [libc++][memory] P2868R1: Removing deprecated typedef std::allocator::is_always_equal (#78562) 2024-01-20 06:07:19 +02:00
memory_resource [libc++] Remove a few transitive includes (#70553) 2023-10-29 18:31:37 +01:00
module.modulemap.in [libc++][numeric] P0543R3: Saturation arithmetic (#77967) 2024-01-22 06:57:45 +02:00
mutex [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
new [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
numbers [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
numeric [libc++][numeric] P0543R3: Saturation arithmetic (#77967) 2024-01-22 06:57:45 +02:00
optional [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
ostream [libc++][print] Enables it on Apple backdeployment. (#76293) 2024-01-16 19:14:33 +01:00
print [libc++][print] Includes <format>. (#76333) 2024-01-16 17:33:01 +01:00
queue [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
random
ranges [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
ratio [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
regex Revert "[libc++] Fix regex_search to match $ alone with match_default flag" (#78349) 2024-01-17 13:51:29 +01:00
scoped_allocator [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
semaphore [libc++][hardening] Categorize assertions that produce incorrect results (#77183) 2024-01-20 23:38:02 -08:00
set [libc++][hardening] Categorize more assertions. (#75918) 2024-01-05 16:29:23 -08:00
shared_mutex [libc++] Improves _LIBCPP_HAS_NO_THREADS guards. (#76624) 2024-01-16 19:13:40 +01:00
source_location [libc++] Update <source_location> and msvc_stdlib_force_include.h (#74266) 2023-12-06 09:04:06 -05:00
span [libc++][span] P2447R4: std::span over an initializer list (#78157) 2024-01-20 06:09:46 +02:00
sstream [libc++] Fix typo in _LIBCPP_REMOVE_TRANSITIVE_INCLUDES (#78639) 2024-01-21 16:15:46 +01:00
stack [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
stdatomic.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
stdbool.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
stddef.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
stdexcept [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
stdint.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
stdio.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
stdlib.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
stop_token [libc++] Improves _LIBCPP_HAS_NO_THREADS guards. (#76624) 2024-01-16 19:13:40 +01:00
streambuf [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
string Revert "[ASan][libc++] Turn on ASan annotations for short strings" (#78627) 2024-01-18 16:33:31 -08:00
string_view [libc++][hardening] Categorize assertions that produce incorrect results (#77183) 2024-01-20 23:38:02 -08:00
string.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
strstream [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
syncstream Implement syncstream (p0053) 2023-11-08 17:45:06 +01:00
system_error
tgmath.h
thread [libc++] Improves _LIBCPP_HAS_NO_THREADS guards. (#76624) 2024-01-16 19:13:40 +01:00
tuple [libc++] Implements P2517R1. (#77239) 2024-01-09 19:11:40 +01:00
type_traits
typeindex [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
typeinfo [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
uchar.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
unordered_map [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
unordered_set [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
utility [libc++] P2770R0: Stashing stashing iterators for proper flattening (#66033) 2023-12-12 09:45:14 -05:00
valarray [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
variant [libc++] Fix Coverity warning about use-after-move (#78780) 2024-01-21 16:24:04 -05:00
vector [ASan][libc++][NFC] refactor vector annotations arguments (#78322) 2024-01-17 08:50:10 +01:00
version [libc++][numeric] P0543R3: Saturation arithmetic (#77967) 2024-01-22 06:57:45 +02:00
wchar.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
wctype.h [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00