[clang] Update std symbols mapping (PR #113612)

Vadim D. via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 25 14:33:51 PDT 2024


https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/113612

>From 96662cb7f681e7158c05a0190894de70eee03d67 Mon Sep 17 00:00:00 2001
From: Vadim Dudkin <vvd170501 at gmail.com>
Date: Thu, 24 Oct 2024 23:18:52 +0300
Subject: [PATCH 1/6] Update std symbol mapping to v20230810; Move assertion to
 detect all ungrouped mappings

---
 .../Inclusions/Stdlib/StandardLibrary.cpp     |   8 +-
 .../Inclusions/Stdlib/StdSpecialSymbolMap.inc | 131 +++++++++++++-
 .../Inclusions/Stdlib/StdSymbolMap.inc        | 171 ++++++++----------
 3 files changed, 200 insertions(+), 110 deletions(-)

diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp b/clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
index 0832bcf66145fa..49e5765af112ff 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
@@ -115,15 +115,17 @@ static int initialize(Lang Language) {
       NSLen = 0;
     }
 
-    if (SymIndex >= 0 &&
-        Mapping->SymbolNames[SymIndex].qualifiedName() == QName) {
-      // Not a new symbol, use the same index.
+    if (SymIndex > 0) {
       assert(llvm::none_of(llvm::ArrayRef(Mapping->SymbolNames, SymIndex),
                            [&QName](const SymbolHeaderMapping::SymbolName &S) {
                              return S.qualifiedName() == QName;
                            }) &&
              "The symbol has been added before, make sure entries in the .inc "
              "file are grouped by symbol name!");
+    }
+    if (SymIndex >= 0 &&
+        Mapping->SymbolNames[SymIndex].qualifiedName() == QName) {
+      // Not a new symbol, use the same index.
     } else {
       // First symbol or new symbol, increment next available index.
       ++SymIndex;
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index 0d351d688a3296..13060a0cc1d529 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -233,6 +233,23 @@ SYMBOL(ssize, std::, <unordered_map>)
 SYMBOL(ssize, std::, <unordered_set>)
 SYMBOL(ssize, std::, <vector>)
 
+// Overloads for different containers, actual header depends on function arg.
+// Probably should use a special handler, like with std::move.
+SYMBOL(erase, std::, <vector>)
+SYMBOL(erase, std::, <deque>)
+SYMBOL(erase, std::, <string>)
+SYMBOL(erase, std::, <list>)
+SYMBOL(erase, std::, <forward_list>)
+SYMBOL(erase_if, std::, <vector>)
+SYMBOL(erase_if, std::, <string>)
+SYMBOL(erase_if, std::, <list>)
+SYMBOL(erase_if, std::, <forward_list>)
+SYMBOL(erase_if, std::, <map>)
+SYMBOL(erase_if, std::, <unordered_map>)
+SYMBOL(erase_if, std::, <set>)
+SYMBOL(erase_if, std::, <deque>)
+SYMBOL(erase_if, std::, <unordered_set>)
+
 // Add headers for generic integer-type abs.
 // Ignore other variants (std::complex, std::valarray, std::intmax_t)
 SYMBOL(abs, std::, <cstdlib>)
@@ -242,9 +259,78 @@ SYMBOL(abs, None, <stdlib.h>)
 SYMBOL(abs, None, <cmath>)
 SYMBOL(abs, None, <math.h>)
 
-// Only add headers for the generic atomic template.
+// Same as abs - ignore variants (std::complex, std::valarray)
+SYMBOL(acos, std::, <cmath>)
+SYMBOL(acos, None, <cmath>)
+SYMBOL(acos, None, <math.h>)
+SYMBOL(acosh, std::, <cmath>)
+SYMBOL(acosh, None, <cmath>)
+SYMBOL(acosh, None, <math.h>)
+SYMBOL(asin, std::, <cmath>)
+SYMBOL(asin, None, <cmath>)
+SYMBOL(asin, None, <math.h>)
+SYMBOL(asinh, std::, <cmath>)
+SYMBOL(asinh, None, <cmath>)
+SYMBOL(asinh, None, <math.h>)
+SYMBOL(atan, std::, <cmath>)
+SYMBOL(atan, None, <cmath>)
+SYMBOL(atan, None, <math.h>)
+SYMBOL(atan2, std::, <cmath>)
+SYMBOL(atan2, None, <cmath>)
+SYMBOL(atan2, None, <math.h>)
+SYMBOL(atanh, std::, <cmath>)
+SYMBOL(atanh, None, <cmath>)
+SYMBOL(atanh, None, <math.h>)
+SYMBOL(cos, std::, <cmath>)
+SYMBOL(cos, None, <cmath>)
+SYMBOL(cos, None, <math.h>)
+SYMBOL(cosh, std::, <cmath>)
+SYMBOL(cosh, None, <cmath>)
+SYMBOL(cosh, None, <math.h>)
+SYMBOL(exp, std::, <cmath>)
+SYMBOL(exp, None, <cmath>)
+SYMBOL(exp, None, <math.h>)
+SYMBOL(log, std::, <cmath>)
+SYMBOL(log, None, <cmath>)
+SYMBOL(log, None, <math.h>)
+SYMBOL(log10, std::, <cmath>)
+SYMBOL(log10, None, <cmath>)
+SYMBOL(log10, None, <math.h>)
+SYMBOL(pow, std::, <cmath>)
+SYMBOL(pow, None, <cmath>)
+SYMBOL(pow, None, <math.h>)
+SYMBOL(sin, std::, <cmath>)
+SYMBOL(sin, None, <cmath>)
+SYMBOL(sin, None, <math.h>)
+SYMBOL(sinh, std::, <cmath>)
+SYMBOL(sinh, None, <cmath>)
+SYMBOL(sinh, None, <math.h>)
+SYMBOL(sqrt, std::, <cmath>)
+SYMBOL(sqrt, None, <cmath>)
+SYMBOL(sqrt, None, <math.h>)
+SYMBOL(tan, std::, <cmath>)
+SYMBOL(tan, None, <cmath>)
+SYMBOL(tan, None, <math.h>)
+SYMBOL(tanh, std::, <cmath>)
+SYMBOL(tanh, None, <cmath>)
+SYMBOL(tanh, None, <math.h>)
+
+// Only add headers for the generic atomic template
+// and atomic_* template functions.
 // Ignore variants (std::weak_ptr, std::shared_ptr).
 SYMBOL(atomic, std::, <atomic>)
+SYMBOL(atomic_compare_exchange_strong, std::, <atomic>)
+SYMBOL(atomic_compare_exchange_strong_explicit, std::, <atomic>)
+SYMBOL(atomic_compare_exchange_weak, std::, <atomic>)
+SYMBOL(atomic_compare_exchange_weak_explicit, std::, <atomic>)
+SYMBOL(atomic_exchange, std::, <atomic>)
+SYMBOL(atomic_exchange_explicit, std::, <atomic>)
+SYMBOL(atomic_is_lock_free, std::, <atomic>)
+SYMBOL(atomic_load, std::, <atomic>)
+SYMBOL(atomic_load_explicit, std::, <atomic>)
+SYMBOL(atomic_store, std::, <atomic>)
+SYMBOL(atomic_store_explicit, std::, <atomic>)
+
 // atomic_* family symbols. <stdatomic.h> is for C compatibility.
 SYMBOL(atomic_bool, std::, <atomic>)
 SYMBOL(atomic_bool, None, <stdatomic.h>)
@@ -355,18 +441,49 @@ SYMBOL(make_error_condition, std::, /*no headers*/)
 
 // cppreference symbol index page was missing these symbols.
 // Remove them when the cppreference offline archive catches up.
-SYMBOL(index_sequence, std::, <utility>)
-SYMBOL(index_sequence_for, std::, <utility>)
-SYMBOL(make_index_sequence, std::, <utility>)
-SYMBOL(make_integer_sequence, std::, <utility>)
+SYMBOL(add_pointer_t, std::, <type_traits>)
+SYMBOL(regular_invocable, std::, <concepts>)
 
 // Symbols missing from the generated symbol map as reported by users.
 // Remove when the generator starts producing them.
-SYMBOL(make_any, std::, <any>)
-SYMBOL(any_cast, std::, <any>)
 SYMBOL(div, std::, <cstdlib>)
 SYMBOL(abort, std::, <cstdlib>)
 
+// Class declaration was broken, header wasn't rendered.
+// Remove when the cppreference offline archive catches up.
+SYMBOL(month_weekday, std::chrono::, <chrono>)
+
+// FIXME Ambiguous symbols
+// Not sure if they should be updated, this is copied from v20220730
+SYMBOL(filebuf, std::, <streambuf>)
+SYMBOL(filebuf, std::, <iostream>)
+SYMBOL(filebuf, std::, <iosfwd>)
+SYMBOL(istream, std::, <istream>)
+SYMBOL(istream, std::, <iostream>)
+SYMBOL(istream, std::, <iosfwd>)
+SYMBOL(ostream, std::, <ostream>)
+SYMBOL(ostream, std::, <iostream>)
+SYMBOL(ostream, std::, <iosfwd>)
+SYMBOL(streampos, std::, <iosfwd>)
+SYMBOL(streampos, std::, <iosfwd>)
+SYMBOL(u16streampos, std::, <iosfwd>)
+SYMBOL(u16streampos, std::, <iosfwd>)
+SYMBOL(u32streampos, std::, <iosfwd>)
+SYMBOL(u32streampos, std::, <iosfwd>)
+SYMBOL(u8streampos, std::, <iosfwd>)
+SYMBOL(u8streampos, std::, <iosfwd>)
+SYMBOL(wfilebuf, std::, <streambuf>)
+SYMBOL(wfilebuf, std::, <iostream>)
+SYMBOL(wfilebuf, std::, <iosfwd>)
+SYMBOL(wistream, std::, <istream>)
+SYMBOL(wistream, std::, <iostream>)
+SYMBOL(wistream, std::, <iosfwd>)
+SYMBOL(wostream, std::, <ostream>)
+SYMBOL(wostream, std::, <iostream>)
+SYMBOL(wostream, std::, <iosfwd>)
+SYMBOL(wstreampos, std::, <iosfwd>)
+SYMBOL(wstreampos, std::, <iosfwd>)
+
 // These are C symbols that are not under std namespace.
 SYMBOL(localtime_r, None, <ctime>)
 SYMBOL(localtime_r, None, <time.h>)
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
index b46bd2e4d7a4b5..dd35ec3097ad31 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
@@ -6,7 +6,7 @@
 // This file was generated automatically by
 // clang/tools/include-mapping/gen_std.py, DO NOT EDIT!
 //
-// Generated from cppreference offline HTML book (modified on 2022-07-30).
+// Generated from cppreference offline HTML book (modified on 2023-08-11).
 //===----------------------------------------------------------------------===//
 
 SYMBOL(ATOMIC_BOOL_LOCK_FREE, None, <atomic>)
@@ -550,15 +550,9 @@ SYMBOL(_Exit, std::, <cstdlib>)
 SYMBOL(_Exit, None, <cstdlib>)
 SYMBOL(_Exit, None, <stdlib.h>)
 SYMBOL(accumulate, std::, <numeric>)
-SYMBOL(acos, std::, <cmath>)
-SYMBOL(acos, None, <cmath>)
-SYMBOL(acos, None, <math.h>)
 SYMBOL(acosf, std::, <cmath>)
 SYMBOL(acosf, None, <cmath>)
 SYMBOL(acosf, None, <math.h>)
-SYMBOL(acosh, std::, <cmath>)
-SYMBOL(acosh, None, <cmath>)
-SYMBOL(acosh, None, <math.h>)
 SYMBOL(acoshf, std::, <cmath>)
 SYMBOL(acoshf, None, <cmath>)
 SYMBOL(acoshf, None, <math.h>)
@@ -575,7 +569,6 @@ SYMBOL(add_cv_t, std::, <type_traits>)
 SYMBOL(add_lvalue_reference, std::, <type_traits>)
 SYMBOL(add_lvalue_reference_t, std::, <type_traits>)
 SYMBOL(add_pointer, std::, <type_traits>)
-SYMBOL(add_pointer_t, std::, <type_traits>)
 SYMBOL(add_rvalue_reference, std::, <type_traits>)
 SYMBOL(add_rvalue_reference_t, std::, <type_traits>)
 SYMBOL(add_volatile, std::, <type_traits>)
@@ -598,7 +591,6 @@ SYMBOL(aligned_union_t, std::, <type_traits>)
 SYMBOL(alignment_of, std::, <type_traits>)
 SYMBOL(alignment_of_v, std::, <type_traits>)
 SYMBOL(all_of, std::, <algorithm>)
-SYMBOL(allocate_at_least, std::, <memory>)
 SYMBOL(allocate_shared, std::, <memory>)
 SYMBOL(allocate_shared_for_overwrite, std::, <memory>)
 SYMBOL(allocation_result, std::, <memory>)
@@ -607,6 +599,7 @@ SYMBOL(allocator_arg, std::, <memory>)
 SYMBOL(allocator_arg_t, std::, <memory>)
 SYMBOL(allocator_traits, std::, <memory>)
 SYMBOL(any, std::, <any>)
+SYMBOL(any_cast, std::, <any>)
 SYMBOL(any_of, std::, <algorithm>)
 SYMBOL(apply, std::, <tuple>)
 SYMBOL(arg, std::, <complex>)
@@ -617,15 +610,9 @@ SYMBOL(as_writable_bytes, std::, <span>)
 SYMBOL(asctime, std::, <ctime>)
 SYMBOL(asctime, None, <ctime>)
 SYMBOL(asctime, None, <time.h>)
-SYMBOL(asin, std::, <cmath>)
-SYMBOL(asin, None, <cmath>)
-SYMBOL(asin, None, <math.h>)
 SYMBOL(asinf, std::, <cmath>)
 SYMBOL(asinf, None, <cmath>)
 SYMBOL(asinf, None, <math.h>)
-SYMBOL(asinh, std::, <cmath>)
-SYMBOL(asinh, None, <cmath>)
-SYMBOL(asinh, None, <math.h>)
 SYMBOL(asinhf, std::, <cmath>)
 SYMBOL(asinhf, None, <cmath>)
 SYMBOL(asinhf, None, <math.h>)
@@ -647,12 +634,6 @@ SYMBOL(async, std::, <future>)
 SYMBOL(at_quick_exit, std::, <cstdlib>)
 SYMBOL(at_quick_exit, None, <cstdlib>)
 SYMBOL(at_quick_exit, None, <stdlib.h>)
-SYMBOL(atan, std::, <cmath>)
-SYMBOL(atan, None, <cmath>)
-SYMBOL(atan, None, <math.h>)
-SYMBOL(atan2, std::, <cmath>)
-SYMBOL(atan2, None, <cmath>)
-SYMBOL(atan2, None, <math.h>)
 SYMBOL(atan2f, std::, <cmath>)
 SYMBOL(atan2f, None, <cmath>)
 SYMBOL(atan2f, None, <math.h>)
@@ -662,9 +643,6 @@ SYMBOL(atan2l, None, <math.h>)
 SYMBOL(atanf, std::, <cmath>)
 SYMBOL(atanf, None, <cmath>)
 SYMBOL(atanf, None, <math.h>)
-SYMBOL(atanh, std::, <cmath>)
-SYMBOL(atanh, None, <cmath>)
-SYMBOL(atanh, None, <math.h>)
 SYMBOL(atanhf, std::, <cmath>)
 SYMBOL(atanhf, None, <cmath>)
 SYMBOL(atanhf, None, <math.h>)
@@ -689,12 +667,6 @@ SYMBOL(atol, None, <stdlib.h>)
 SYMBOL(atoll, std::, <cstdlib>)
 SYMBOL(atoll, None, <cstdlib>)
 SYMBOL(atoll, None, <stdlib.h>)
-SYMBOL(atomic_compare_exchange_strong, std::, <atomic>)
-SYMBOL(atomic_compare_exchange_strong_explicit, std::, <atomic>)
-SYMBOL(atomic_compare_exchange_weak, std::, <atomic>)
-SYMBOL(atomic_compare_exchange_weak_explicit, std::, <atomic>)
-SYMBOL(atomic_exchange, std::, <atomic>)
-SYMBOL(atomic_exchange_explicit, std::, <atomic>)
 SYMBOL(atomic_fetch_add, std::, <atomic>)
 SYMBOL(atomic_fetch_add_explicit, std::, <atomic>)
 SYMBOL(atomic_fetch_and, std::, <atomic>)
@@ -717,15 +689,10 @@ SYMBOL(atomic_flag_test_explicit, std::, <atomic>)
 SYMBOL(atomic_flag_wait, std::, <atomic>)
 SYMBOL(atomic_flag_wait_explicit, std::, <atomic>)
 SYMBOL(atomic_init, std::, <atomic>)
-SYMBOL(atomic_is_lock_free, std::, <atomic>)
-SYMBOL(atomic_load, std::, <atomic>)
-SYMBOL(atomic_load_explicit, std::, <atomic>)
 SYMBOL(atomic_notify_all, std::, <atomic>)
 SYMBOL(atomic_notify_one, std::, <atomic>)
 SYMBOL(atomic_ref, std::, <atomic>)
 SYMBOL(atomic_signal_fence, std::, <atomic>)
-SYMBOL(atomic_store, std::, <atomic>)
-SYMBOL(atomic_store_explicit, std::, <atomic>)
 SYMBOL(atomic_thread_fence, std::, <atomic>)
 SYMBOL(atomic_wait, std::, <atomic>)
 SYMBOL(atomic_wait_explicit, std::, <atomic>)
@@ -738,6 +705,7 @@ SYMBOL(bad_any_cast, std::, <any>)
 SYMBOL(bad_array_new_length, std::, <new>)
 SYMBOL(bad_cast, std::, <typeinfo>)
 SYMBOL(bad_exception, std::, <exception>)
+SYMBOL(bad_expected_access, std::, <expected>)
 SYMBOL(bad_function_call, std::, <functional>)
 SYMBOL(bad_optional_access, std::, <optional>)
 SYMBOL(bad_typeid, std::, <typeinfo>)
@@ -745,12 +713,14 @@ SYMBOL(bad_variant_access, std::, <variant>)
 SYMBOL(bad_weak_ptr, std::, <memory>)
 SYMBOL(barrier, std::, <barrier>)
 SYMBOL(basic_common_reference, std::, <type_traits>)
+SYMBOL(basic_const_iterator, std::, <iterator>)
 SYMBOL(basic_filebuf, std::, <fstream>)
 SYMBOL(basic_filebuf, std::, <iosfwd>)
 SYMBOL(basic_format_arg, std::, <format>)
 SYMBOL(basic_format_args, std::, <format>)
 SYMBOL(basic_format_context, std::, <format>)
 SYMBOL(basic_format_parse_context, std::, <format>)
+SYMBOL(basic_format_string, std::, <format>)
 SYMBOL(basic_fstream, std::, <fstream>)
 SYMBOL(basic_fstream, std::, <iosfwd>)
 SYMBOL(basic_ifstream, std::, <fstream>)
@@ -932,11 +902,13 @@ SYMBOL(conditional_t, std::, <type_traits>)
 SYMBOL(conj, std::, <complex>)
 SYMBOL(conjunction, std::, <type_traits>)
 SYMBOL(conjunction_v, std::, <type_traits>)
+SYMBOL(const_iterator, std::, <iterator>)
 SYMBOL(const_mem_fun1_ref_t, std::, <functional>)
 SYMBOL(const_mem_fun1_t, std::, <functional>)
 SYMBOL(const_mem_fun_ref_t, std::, <functional>)
 SYMBOL(const_mem_fun_t, std::, <functional>)
 SYMBOL(const_pointer_cast, std::, <memory>)
+SYMBOL(const_sentinel, std::, <iterator>)
 SYMBOL(construct_at, std::, <memory>)
 SYMBOL(constructible_from, std::, <concepts>)
 SYMBOL(contiguous_iterator, std::, <iterator>)
@@ -959,15 +931,9 @@ SYMBOL(copysignl, None, <cmath>)
 SYMBOL(copysignl, None, <math.h>)
 SYMBOL(coroutine_handle, std::, <coroutine>)
 SYMBOL(coroutine_traits, std::, <coroutine>)
-SYMBOL(cos, std::, <cmath>)
-SYMBOL(cos, None, <cmath>)
-SYMBOL(cos, None, <math.h>)
 SYMBOL(cosf, std::, <cmath>)
 SYMBOL(cosf, None, <cmath>)
 SYMBOL(cosf, None, <math.h>)
-SYMBOL(cosh, std::, <cmath>)
-SYMBOL(cosh, None, <cmath>)
-SYMBOL(cosh, None, <math.h>)
 SYMBOL(coshf, std::, <cmath>)
 SYMBOL(coshf, None, <cmath>)
 SYMBOL(coshf, None, <math.h>)
@@ -1019,6 +985,7 @@ SYMBOL(deci, std::, <ratio>)
 SYMBOL(declare_no_pointers, std::, <memory>)
 SYMBOL(declare_reachable, std::, <memory>)
 SYMBOL(declval, std::, <utility>)
+SYMBOL(default_accessor, std::, <mdspan>)
 SYMBOL(default_delete, std::, <memory>)
 SYMBOL(default_initializable, std::, <concepts>)
 SYMBOL(default_random_engine, std::, <random>)
@@ -1040,6 +1007,7 @@ SYMBOL(destroy_n, std::, <memory>)
 SYMBOL(destroying_delete, std::, <new>)
 SYMBOL(destroying_delete_t, std::, <new>)
 SYMBOL(destructible, std::, <concepts>)
+SYMBOL(dextents, std::, <mdspan>)
 SYMBOL(difftime, std::, <ctime>)
 SYMBOL(difftime, None, <ctime>)
 SYMBOL(difftime, None, <time.h>)
@@ -1084,8 +1052,6 @@ SYMBOL(equal_to, std::, <functional>)
 SYMBOL(equality_comparable, std::, <concepts>)
 SYMBOL(equality_comparable_with, std::, <concepts>)
 SYMBOL(equivalence_relation, std::, <concepts>)
-SYMBOL(erase, std::, <vector>)
-SYMBOL(erase_if, std::, <vector>)
 SYMBOL(erf, std::, <cmath>)
 SYMBOL(erf, None, <cmath>)
 SYMBOL(erf, None, <math.h>)
@@ -1116,9 +1082,6 @@ SYMBOL(exclusive_scan, std::, <numeric>)
 SYMBOL(exit, std::, <cstdlib>)
 SYMBOL(exit, None, <cstdlib>)
 SYMBOL(exit, None, <stdlib.h>)
-SYMBOL(exp, std::, <cmath>)
-SYMBOL(exp, None, <cmath>)
-SYMBOL(exp, None, <math.h>)
 SYMBOL(exp2, std::, <cmath>)
 SYMBOL(exp2, None, <cmath>)
 SYMBOL(exp2, None, <math.h>)
@@ -1128,6 +1091,7 @@ SYMBOL(exp2f, None, <math.h>)
 SYMBOL(exp2l, std::, <cmath>)
 SYMBOL(exp2l, None, <cmath>)
 SYMBOL(exp2l, None, <math.h>)
+SYMBOL(expected, std::, <expected>)
 SYMBOL(expf, std::, <cmath>)
 SYMBOL(expf, None, <cmath>)
 SYMBOL(expf, None, <math.h>)
@@ -1149,6 +1113,7 @@ SYMBOL(expm1l, None, <math.h>)
 SYMBOL(exponential_distribution, std::, <random>)
 SYMBOL(extent, std::, <type_traits>)
 SYMBOL(extent_v, std::, <type_traits>)
+SYMBOL(extents, std::, <mdspan>)
 SYMBOL(extreme_value_distribution, std::, <random>)
 SYMBOL(fabs, std::, <cmath>)
 SYMBOL(fabs, None, <cmath>)
@@ -1236,9 +1201,6 @@ SYMBOL(fgetwc, None, <wchar.h>)
 SYMBOL(fgetws, std::, <cwchar>)
 SYMBOL(fgetws, None, <cwchar>)
 SYMBOL(fgetws, None, <wchar.h>)
-SYMBOL(filebuf, std::, <streambuf>)
-SYMBOL(filebuf, std::, <iostream>)
-SYMBOL(filebuf, std::, <iosfwd>)
 SYMBOL(fill, std::, <algorithm>)
 SYMBOL(fill_n, std::, <algorithm>)
 SYMBOL(find, std::, <algorithm>)
@@ -1314,6 +1276,7 @@ SYMBOL(format_args, std::, <format>)
 SYMBOL(format_context, std::, <format>)
 SYMBOL(format_error, std::, <format>)
 SYMBOL(format_parse_context, std::, <format>)
+SYMBOL(format_string, std::, <format>)
 SYMBOL(format_to, std::, <format>)
 SYMBOL(format_to_n, std::, <format>)
 SYMBOL(format_to_n_result, std::, <format>)
@@ -1410,6 +1373,7 @@ SYMBOL(gcd, std::, <numeric>)
 SYMBOL(generate, std::, <algorithm>)
 SYMBOL(generate_canonical, std::, <random>)
 SYMBOL(generate_n, std::, <algorithm>)
+SYMBOL(generator, std::, <generator>)
 SYMBOL(generic_category, std::, <system_error>)
 SYMBOL(geometric_distribution, std::, <random>)
 SYMBOL(get_deleter, std::, <memory>)
@@ -1510,6 +1474,8 @@ SYMBOL(inclusive_scan, std::, <numeric>)
 SYMBOL(incrementable, std::, <iterator>)
 SYMBOL(incrementable_traits, std::, <iterator>)
 SYMBOL(independent_bits_engine, std::, <random>)
+SYMBOL(index_sequence, std::, <utility>)
+SYMBOL(index_sequence_for, std::, <utility>)
 SYMBOL(indirect_array, std::, <valarray>)
 SYMBOL(indirect_binary_predicate, std::, <iterator>)
 SYMBOL(indirect_equivalence_relation, std::, <iterator>)
@@ -1840,9 +1806,6 @@ SYMBOL(ispunct, None, <ctype.h>)
 SYMBOL(isspace, std::, <cctype>)
 SYMBOL(isspace, None, <cctype>)
 SYMBOL(isspace, None, <ctype.h>)
-SYMBOL(istream, std::, <istream>)
-SYMBOL(istream, std::, <iostream>)
-SYMBOL(istream, std::, <iosfwd>)
 SYMBOL(istream_iterator, std::, <iterator>)
 SYMBOL(istreambuf_iterator, std::, <iterator>)
 SYMBOL(istreambuf_iterator, std::, <iosfwd>)
@@ -1999,12 +1962,6 @@ SYMBOL(localtime, None, <ctime>)
 SYMBOL(localtime, None, <time.h>)
 SYMBOL(lock, std::, <mutex>)
 SYMBOL(lock_guard, std::, <mutex>)
-SYMBOL(log, std::, <cmath>)
-SYMBOL(log, None, <cmath>)
-SYMBOL(log, None, <math.h>)
-SYMBOL(log10, std::, <cmath>)
-SYMBOL(log10, None, <cmath>)
-SYMBOL(log10, None, <math.h>)
 SYMBOL(log10f, std::, <cmath>)
 SYMBOL(log10f, None, <cmath>)
 SYMBOL(log10f, None, <math.h>)
@@ -2071,10 +2028,15 @@ SYMBOL(lroundf, None, <math.h>)
 SYMBOL(lroundl, std::, <cmath>)
 SYMBOL(lroundl, None, <cmath>)
 SYMBOL(lroundl, None, <math.h>)
+SYMBOL(make_any, std::, <any>)
+SYMBOL(make_const_iterator, std::, <iterator>)
+SYMBOL(make_const_sentinel, std::, <iterator>)
 SYMBOL(make_exception_ptr, std::, <exception>)
 SYMBOL(make_format_args, std::, <format>)
 SYMBOL(make_from_tuple, std::, <tuple>)
 SYMBOL(make_heap, std::, <algorithm>)
+SYMBOL(make_index_sequence, std::, <utility>)
+SYMBOL(make_integer_sequence, std::, <utility>)
 SYMBOL(make_move_iterator, std::, <iterator>)
 SYMBOL(make_obj_using_allocator, std::, <memory>)
 SYMBOL(make_optional, std::, <optional>)
@@ -2131,6 +2093,7 @@ SYMBOL(mbstowcs, None, <stdlib.h>)
 SYMBOL(mbtowc, std::, <cstdlib>)
 SYMBOL(mbtowc, None, <cstdlib>)
 SYMBOL(mbtowc, None, <stdlib.h>)
+SYMBOL(mdspan, std::, <mdspan>)
 SYMBOL(mega, std::, <ratio>)
 SYMBOL(mem_fn, std::, <functional>)
 SYMBOL(mem_fun, std::, <functional>)
@@ -2307,9 +2270,6 @@ SYMBOL(open_mode, std::, <iostream>)
 SYMBOL(optional, std::, <optional>)
 SYMBOL(ospanstream, std::, <spanstream>)
 SYMBOL(ospanstream, std::, <iosfwd>)
-SYMBOL(ostream, std::, <ostream>)
-SYMBOL(ostream, std::, <iostream>)
-SYMBOL(ostream, std::, <iosfwd>)
 SYMBOL(ostream_iterator, std::, <iterator>)
 SYMBOL(ostreambuf_iterator, std::, <iterator>)
 SYMBOL(ostreambuf_iterator, std::, <iosfwd>)
@@ -2352,9 +2312,6 @@ SYMBOL(poisson_distribution, std::, <random>)
 SYMBOL(polar, std::, <complex>)
 SYMBOL(pop_heap, std::, <algorithm>)
 SYMBOL(popcount, std::, <bit>)
-SYMBOL(pow, std::, <cmath>)
-SYMBOL(pow, None, <cmath>)
-SYMBOL(pow, None, <math.h>)
 SYMBOL(powf, std::, <cmath>)
 SYMBOL(powf, None, <cmath>)
 SYMBOL(powf, None, <math.h>)
@@ -2365,9 +2322,11 @@ SYMBOL(predicate, std::, <concepts>)
 SYMBOL(preferred, std::, <memory>)
 SYMBOL(prev, std::, <iterator>)
 SYMBOL(prev_permutation, std::, <algorithm>)
+SYMBOL(print, std::, <print>)
 SYMBOL(printf, std::, <cstdio>)
 SYMBOL(printf, None, <cstdio>)
 SYMBOL(printf, None, <stdio.h>)
+SYMBOL(println, std::, <print>)
 SYMBOL(priority_queue, std::, <queue>)
 SYMBOL(proj, std::, <complex>)
 SYMBOL(projected, std::, <iterator>)
@@ -2455,7 +2414,6 @@ SYMBOL(regex_search, std::, <regex>)
 SYMBOL(regex_token_iterator, std::, <regex>)
 SYMBOL(regex_traits, std::, <regex>)
 SYMBOL(regular, std::, <concepts>)
-SYMBOL(regular_invocable, std::, <concepts>)
 SYMBOL(reinterpret_pointer_cast, std::, <memory>)
 SYMBOL(relation, std::, <concepts>)
 SYMBOL(remainder, std::, <cmath>)
@@ -2628,15 +2586,9 @@ SYMBOL(signbit, std::, <cmath>)
 SYMBOL(signbit, None, <cmath>)
 SYMBOL(signbit, None, <math.h>)
 SYMBOL(signed_integral, std::, <concepts>)
-SYMBOL(sin, std::, <cmath>)
-SYMBOL(sin, None, <cmath>)
-SYMBOL(sin, None, <math.h>)
 SYMBOL(sinf, std::, <cmath>)
 SYMBOL(sinf, None, <cmath>)
 SYMBOL(sinf, None, <math.h>)
-SYMBOL(sinh, std::, <cmath>)
-SYMBOL(sinh, None, <cmath>)
-SYMBOL(sinh, None, <math.h>)
 SYMBOL(sinhf, std::, <cmath>)
 SYMBOL(sinhf, None, <cmath>)
 SYMBOL(sinhf, None, <math.h>)
@@ -2682,9 +2634,6 @@ SYMBOL(sph_neumannl, std::, <cmath>)
 SYMBOL(sprintf, std::, <cstdio>)
 SYMBOL(sprintf, None, <cstdio>)
 SYMBOL(sprintf, None, <stdio.h>)
-SYMBOL(sqrt, std::, <cmath>)
-SYMBOL(sqrt, None, <cmath>)
-SYMBOL(sqrt, None, <math.h>)
 SYMBOL(sqrtf, std::, <cmath>)
 SYMBOL(sqrtf, None, <cmath>)
 SYMBOL(sqrtf, None, <math.h>)
@@ -2740,8 +2689,6 @@ SYMBOL(streambuf, std::, <iostream>)
 SYMBOL(streambuf, std::, <iosfwd>)
 SYMBOL(streamoff, std::, <ios>)
 SYMBOL(streamoff, std::, <iostream>)
-SYMBOL(streampos, std::, <iosfwd>)
-SYMBOL(streampos, std::, <iosfwd>)
 SYMBOL(streamsize, std::, <ios>)
 SYMBOL(streamsize, std::, <iostream>)
 SYMBOL(strerror, std::, <cstring>)
@@ -2840,15 +2787,9 @@ SYMBOL(system, None, <cstdlib>)
 SYMBOL(system, None, <stdlib.h>)
 SYMBOL(system_category, std::, <system_error>)
 SYMBOL(system_error, std::, <system_error>)
-SYMBOL(tan, std::, <cmath>)
-SYMBOL(tan, None, <cmath>)
-SYMBOL(tan, None, <math.h>)
 SYMBOL(tanf, std::, <cmath>)
 SYMBOL(tanf, None, <cmath>)
 SYMBOL(tanf, None, <math.h>)
-SYMBOL(tanh, std::, <cmath>)
-SYMBOL(tanh, None, <cmath>)
-SYMBOL(tanh, None, <math.h>)
 SYMBOL(tanhf, std::, <cmath>)
 SYMBOL(tanhf, None, <cmath>)
 SYMBOL(tanhf, None, <math.h>)
@@ -2954,16 +2895,10 @@ SYMBOL(type_identity, std::, <type_traits>)
 SYMBOL(type_identity_t, std::, <type_traits>)
 SYMBOL(type_index, std::, <typeindex>)
 SYMBOL(type_info, std::, <typeinfo>)
-SYMBOL(u16streampos, std::, <iosfwd>)
-SYMBOL(u16streampos, std::, <iosfwd>)
 SYMBOL(u16string, std::, <string>)
 SYMBOL(u16string_view, std::, <string_view>)
-SYMBOL(u32streampos, std::, <iosfwd>)
-SYMBOL(u32streampos, std::, <iosfwd>)
 SYMBOL(u32string, std::, <string>)
 SYMBOL(u32string_view, std::, <string_view>)
-SYMBOL(u8streampos, std::, <iosfwd>)
-SYMBOL(u8streampos, std::, <iosfwd>)
 SYMBOL(u8string, std::, <string>)
 SYMBOL(u8string_view, std::, <string_view>)
 SYMBOL(uint16_t, std::, <cstdint>)
@@ -3017,6 +2952,9 @@ SYMBOL(undeclare_reachable, std::, <memory>)
 SYMBOL(underflow_error, std::, <stdexcept>)
 SYMBOL(underlying_type, std::, <type_traits>)
 SYMBOL(underlying_type_t, std::, <type_traits>)
+SYMBOL(unexpect, std::, <expected>)
+SYMBOL(unexpect_t, std::, <expected>)
+SYMBOL(unexpected, std::, <expected>)
 SYMBOL(unexpected_handler, std::, <exception>)
 SYMBOL(ungetc, std::, <cstdio>)
 SYMBOL(ungetc, None, <cstdio>)
@@ -3087,6 +3025,8 @@ SYMBOL(vfwscanf, None, <wchar.h>)
 SYMBOL(visit, std::, <variant>)
 SYMBOL(visit_format_arg, std::, <format>)
 SYMBOL(void_t, std::, <type_traits>)
+SYMBOL(vprint_nonunicode, std::, <print>)
+SYMBOL(vprint_unicode, std::, <print>)
 SYMBOL(vprintf, std::, <cstdio>)
 SYMBOL(vprintf, None, <cstdio>)
 SYMBOL(vprintf, None, <stdio.h>)
@@ -3233,12 +3173,10 @@ SYMBOL(weak_ordering, std::, <compare>)
 SYMBOL(weak_ptr, std::, <memory>)
 SYMBOL(weakly_incrementable, std::, <iterator>)
 SYMBOL(weibull_distribution, std::, <random>)
-SYMBOL(wfilebuf, std::, <streambuf>)
-SYMBOL(wfilebuf, std::, <iostream>)
-SYMBOL(wfilebuf, std::, <iosfwd>)
 SYMBOL(wformat_args, std::, <format>)
 SYMBOL(wformat_context, std::, <format>)
 SYMBOL(wformat_parse_context, std::, <format>)
+SYMBOL(wformat_string, std::, <format>)
 SYMBOL(wfstream, std::, <fstream>)
 SYMBOL(wfstream, std::, <iosfwd>)
 SYMBOL(wifstream, std::, <fstream>)
@@ -3251,9 +3189,6 @@ SYMBOL(wiostream, std::, <iostream>)
 SYMBOL(wiostream, std::, <iosfwd>)
 SYMBOL(wispanstream, std::, <spanstream>)
 SYMBOL(wispanstream, std::, <iosfwd>)
-SYMBOL(wistream, std::, <istream>)
-SYMBOL(wistream, std::, <iostream>)
-SYMBOL(wistream, std::, <iosfwd>)
 SYMBOL(wistringstream, std::, <sstream>)
 SYMBOL(wistringstream, std::, <iosfwd>)
 SYMBOL(wmemchr, std::, <cwchar>)
@@ -3275,9 +3210,6 @@ SYMBOL(wofstream, std::, <fstream>)
 SYMBOL(wofstream, std::, <iosfwd>)
 SYMBOL(wospanstream, std::, <spanstream>)
 SYMBOL(wospanstream, std::, <iosfwd>)
-SYMBOL(wostream, std::, <ostream>)
-SYMBOL(wostream, std::, <iostream>)
-SYMBOL(wostream, std::, <iosfwd>)
 SYMBOL(wostringstream, std::, <sstream>)
 SYMBOL(wostringstream, std::, <iosfwd>)
 SYMBOL(wosyncstream, std::, <syncstream>)
@@ -3302,8 +3234,6 @@ SYMBOL(wssub_match, std::, <regex>)
 SYMBOL(wstreambuf, std::, <streambuf>)
 SYMBOL(wstreambuf, std::, <iostream>)
 SYMBOL(wstreambuf, std::, <iosfwd>)
-SYMBOL(wstreampos, std::, <iosfwd>)
-SYMBOL(wstreampos, std::, <iosfwd>)
 SYMBOL(wstring, std::, <string>)
 SYMBOL(wstring_convert, std::, <locale>)
 SYMBOL(wstring_view, std::, <string_view>)
@@ -3338,6 +3268,7 @@ SYMBOL(Tuesday, std::chrono::, <chrono>)
 SYMBOL(Wednesday, std::chrono::, <chrono>)
 SYMBOL(abs, std::chrono::, <chrono>)
 SYMBOL(ambiguous_local_time, std::chrono::, <chrono>)
+SYMBOL(ceil, std::chrono::, <chrono>)
 SYMBOL(choose, std::chrono::, <chrono>)
 SYMBOL(clock_cast, std::chrono::, <chrono>)
 SYMBOL(clock_time_conversion, std::chrono::, <chrono>)
@@ -3349,6 +3280,8 @@ SYMBOL(duration_values, std::chrono::, <chrono>)
 SYMBOL(file_clock, std::chrono::, <chrono>)
 SYMBOL(file_seconds, std::chrono::, <chrono>)
 SYMBOL(file_time, std::chrono::, <chrono>)
+SYMBOL(floor, std::chrono::, <chrono>)
+SYMBOL(from_stream, std::chrono::, <chrono>)
 SYMBOL(get_leap_second_info, std::chrono::, <chrono>)
 SYMBOL(gps_clock, std::chrono::, <chrono>)
 SYMBOL(gps_seconds, std::chrono::, <chrono>)
@@ -3378,11 +3311,11 @@ SYMBOL(minutes, std::chrono::, <chrono>)
 SYMBOL(month, std::chrono::, <chrono>)
 SYMBOL(month_day, std::chrono::, <chrono>)
 SYMBOL(month_day_last, std::chrono::, <chrono>)
-SYMBOL(month_weekday, std::chrono::, <chrono>)
 SYMBOL(month_weekday_last, std::chrono::, <chrono>)
 SYMBOL(nanoseconds, std::chrono::, <chrono>)
 SYMBOL(nonexistent_local_time, std::chrono::, <chrono>)
 SYMBOL(parse, std::chrono::, <chrono>)
+SYMBOL(round, std::chrono::, <chrono>)
 SYMBOL(seconds, std::chrono::, <chrono>)
 SYMBOL(steady_clock, std::chrono::, <chrono>)
 SYMBOL(sys_days, std::chrono::, <chrono>)
@@ -3425,6 +3358,7 @@ SYMBOL(sequenced_policy, std::execution::, <execution>)
 SYMBOL(unseq, std::execution::, <execution>)
 SYMBOL(unsequenced_policy, std::execution::, <execution>)
 SYMBOL(absolute, std::filesystem::, <filesystem>)
+SYMBOL(begin, std::filesystem::, <filesystem>)
 SYMBOL(canonical, std::filesystem::, <filesystem>)
 SYMBOL(copy, std::filesystem::, <filesystem>)
 SYMBOL(copy_file, std::filesystem::, <filesystem>)
@@ -3439,6 +3373,7 @@ SYMBOL(current_path, std::filesystem::, <filesystem>)
 SYMBOL(directory_entry, std::filesystem::, <filesystem>)
 SYMBOL(directory_iterator, std::filesystem::, <filesystem>)
 SYMBOL(directory_options, std::filesystem::, <filesystem>)
+SYMBOL(end, std::filesystem::, <filesystem>)
 SYMBOL(equivalent, std::filesystem::, <filesystem>)
 SYMBOL(exists, std::filesystem::, <filesystem>)
 SYMBOL(file_size, std::filesystem::, <filesystem>)
@@ -3539,6 +3474,8 @@ SYMBOL(wcmatch, std::pmr::, <regex>)
 SYMBOL(wsmatch, std::pmr::, <regex>)
 SYMBOL(wstring, std::pmr::, <string>)
 SYMBOL(adjacent_find, std::ranges::, <algorithm>)
+SYMBOL(adjacent_transform_view, std::ranges::, <ranges>)
+SYMBOL(adjacent_view, std::ranges::, <ranges>)
 SYMBOL(advance, std::ranges::, <iterator>)
 SYMBOL(all_of, std::ranges::, <algorithm>)
 SYMBOL(any_of, std::ranges::, <algorithm>)
@@ -3551,9 +3488,12 @@ SYMBOL(binary_transform_result, std::ranges::, <algorithm>)
 SYMBOL(borrowed_iterator_t, std::ranges::, <ranges>)
 SYMBOL(borrowed_range, std::ranges::, <ranges>)
 SYMBOL(borrowed_subrange_t, std::ranges::, <ranges>)
+SYMBOL(cartesian_product_view, std::ranges::, <ranges>)
 SYMBOL(cbegin, std::ranges::, <ranges>)
 SYMBOL(cdata, std::ranges::, <ranges>)
 SYMBOL(cend, std::ranges::, <ranges>)
+SYMBOL(chunk_by_view, std::ranges::, <ranges>)
+SYMBOL(chunk_view, std::ranges::, <ranges>)
 SYMBOL(clamp, std::ranges::, <algorithm>)
 SYMBOL(common_range, std::ranges::, <ranges>)
 SYMBOL(common_view, std::ranges::, <ranges>)
@@ -3604,6 +3544,12 @@ SYMBOL(find_if_not, std::ranges::, <algorithm>)
 SYMBOL(find_last, std::ranges::, <algorithm>)
 SYMBOL(find_last_if, std::ranges::, <algorithm>)
 SYMBOL(find_last_if_not, std::ranges::, <algorithm>)
+SYMBOL(fold_left, std::ranges::, <algorithm>)
+SYMBOL(fold_left_first, std::ranges::, <algorithm>)
+SYMBOL(fold_left_first_with_iter, std::ranges::, <algorithm>)
+SYMBOL(fold_left_with_iter, std::ranges::, <algorithm>)
+SYMBOL(fold_right, std::ranges::, <algorithm>)
+SYMBOL(fold_right_last, std::ranges::, <algorithm>)
 SYMBOL(for_each, std::ranges::, <algorithm>)
 SYMBOL(for_each_n, std::ranges::, <algorithm>)
 SYMBOL(for_each_n_result, std::ranges::, <algorithm>)
@@ -3611,6 +3557,7 @@ SYMBOL(for_each_result, std::ranges::, <algorithm>)
 SYMBOL(forward_range, std::ranges::, <ranges>)
 SYMBOL(generate, std::ranges::, <algorithm>)
 SYMBOL(generate_n, std::ranges::, <algorithm>)
+SYMBOL(get, std::ranges::, <ranges>)
 SYMBOL(greater, std::ranges::, <functional>)
 SYMBOL(greater_equal, std::ranges::, <functional>)
 SYMBOL(in_found_result, std::ranges::, <algorithm>)
@@ -3684,6 +3631,7 @@ SYMBOL(prev_permutation_result, std::ranges::, <algorithm>)
 SYMBOL(push_heap, std::ranges::, <algorithm>)
 SYMBOL(random_access_range, std::ranges::, <ranges>)
 SYMBOL(range, std::ranges::, <ranges>)
+SYMBOL(range_adaptor_closure, std::ranges::, <ranges>)
 SYMBOL(range_const_reference_t, std::ranges::, <ranges>)
 SYMBOL(range_difference_t, std::ranges::, <ranges>)
 SYMBOL(range_reference_t, std::ranges::, <ranges>)
@@ -3699,6 +3647,7 @@ SYMBOL(remove_copy_if_result, std::ranges::, <algorithm>)
 SYMBOL(remove_copy_result, std::ranges::, <algorithm>)
 SYMBOL(remove_if, std::ranges::, <algorithm>)
 SYMBOL(rend, std::ranges::, <ranges>)
+SYMBOL(repeat_view, std::ranges::, <ranges>)
 SYMBOL(replace, std::ranges::, <algorithm>)
 SYMBOL(replace_copy, std::ranges::, <algorithm>)
 SYMBOL(replace_copy_if, std::ranges::, <algorithm>)
@@ -3730,6 +3679,7 @@ SYMBOL(shuffle, std::ranges::, <algorithm>)
 SYMBOL(single_view, std::ranges::, <ranges>)
 SYMBOL(size, std::ranges::, <ranges>)
 SYMBOL(sized_range, std::ranges::, <ranges>)
+SYMBOL(slide_view, std::ranges::, <ranges>)
 SYMBOL(sort, std::ranges::, <algorithm>)
 SYMBOL(sort_heap, std::ranges::, <algorithm>)
 SYMBOL(split_view, std::ranges::, <ranges>)
@@ -3737,6 +3687,7 @@ SYMBOL(ssize, std::ranges::, <ranges>)
 SYMBOL(stable_partition, std::ranges::, <algorithm>)
 SYMBOL(stable_sort, std::ranges::, <algorithm>)
 SYMBOL(starts_with, std::ranges::, <algorithm>)
+SYMBOL(stride_view, std::ranges::, <ranges>)
 SYMBOL(subrange, std::ranges::, <ranges>)
 SYMBOL(subrange_kind, std::ranges::, <ranges>)
 SYMBOL(swap, std::ranges::, <concepts>)
@@ -3773,10 +3724,15 @@ SYMBOL(viewable_range, std::ranges::, <ranges>)
 SYMBOL(wistream_view, std::ranges::, <ranges>)
 SYMBOL(zip_transform_view, std::ranges::, <ranges>)
 SYMBOL(zip_view, std::ranges::, <ranges>)
+SYMBOL(adjacent, std::ranges::views::, <ranges>)
+SYMBOL(adjacent_transform, std::ranges::views::, <ranges>)
 SYMBOL(all, std::ranges::views::, <ranges>)
 SYMBOL(all_t, std::ranges::views::, <ranges>)
 SYMBOL(as_const, std::ranges::views::, <ranges>)
 SYMBOL(as_rvalue, std::ranges::views::, <ranges>)
+SYMBOL(cartesian_product, std::ranges::views::, <ranges>)
+SYMBOL(chunk, std::ranges::views::, <ranges>)
+SYMBOL(chunk_by, std::ranges::views::, <ranges>)
 SYMBOL(common, std::ranges::views::, <ranges>)
 SYMBOL(counted, std::ranges::views::, <ranges>)
 SYMBOL(drop, std::ranges::views::, <ranges>)
@@ -3791,9 +3747,14 @@ SYMBOL(join, std::ranges::views::, <ranges>)
 SYMBOL(join_with, std::ranges::views::, <ranges>)
 SYMBOL(keys, std::ranges::views::, <ranges>)
 SYMBOL(lazy_split, std::ranges::views::, <ranges>)
+SYMBOL(pairwise, std::ranges::views::, <ranges>)
+SYMBOL(pairwise_transform, std::ranges::views::, <ranges>)
+SYMBOL(repeat, std::ranges::views::, <ranges>)
 SYMBOL(reverse, std::ranges::views::, <ranges>)
 SYMBOL(single, std::ranges::views::, <ranges>)
+SYMBOL(slide, std::ranges::views::, <ranges>)
 SYMBOL(split, std::ranges::views::, <ranges>)
+SYMBOL(stride, std::ranges::views::, <ranges>)
 SYMBOL(take, std::ranges::views::, <ranges>)
 SYMBOL(take_while, std::ranges::views::, <ranges>)
 SYMBOL(transform, std::ranges::views::, <ranges>)
@@ -3844,10 +3805,15 @@ SYMBOL(get_id, std::this_thread::, <thread>)
 SYMBOL(sleep_for, std::this_thread::, <thread>)
 SYMBOL(sleep_until, std::this_thread::, <thread>)
 SYMBOL(yield, std::this_thread::, <thread>)
+SYMBOL(adjacent, std::views::, <ranges>)
+SYMBOL(adjacent_transform, std::views::, <ranges>)
 SYMBOL(all, std::views::, <ranges>)
 SYMBOL(all_t, std::views::, <ranges>)
 SYMBOL(as_const, std::views::, <ranges>)
 SYMBOL(as_rvalue, std::views::, <ranges>)
+SYMBOL(cartesian_product, std::views::, <ranges>)
+SYMBOL(chunk, std::views::, <ranges>)
+SYMBOL(chunk_by, std::views::, <ranges>)
 SYMBOL(common, std::views::, <ranges>)
 SYMBOL(counted, std::views::, <ranges>)
 SYMBOL(drop, std::views::, <ranges>)
@@ -3862,9 +3828,14 @@ SYMBOL(join, std::views::, <ranges>)
 SYMBOL(join_with, std::views::, <ranges>)
 SYMBOL(keys, std::views::, <ranges>)
 SYMBOL(lazy_split, std::views::, <ranges>)
+SYMBOL(pairwise, std::views::, <ranges>)
+SYMBOL(pairwise_transform, std::views::, <ranges>)
+SYMBOL(repeat, std::views::, <ranges>)
 SYMBOL(reverse, std::views::, <ranges>)
 SYMBOL(single, std::views::, <ranges>)
+SYMBOL(slide, std::views::, <ranges>)
 SYMBOL(split, std::views::, <ranges>)
+SYMBOL(stride, std::views::, <ranges>)
 SYMBOL(take, std::views::, <ranges>)
 SYMBOL(take_while, std::views::, <ranges>)
 SYMBOL(transform, std::views::, <ranges>)

>From 874d3ab28ea8ebf31e7e8312c95599d5924c4bad Mon Sep 17 00:00:00 2001
From: vvd170501 <36827317+vvd170501 at users.noreply.github.com>
Date: Fri, 25 Oct 2024 10:25:57 +0300
Subject: [PATCH 2/6] Update mapping to v20240610

---
 .../Inclusions/Stdlib/StdSpecialSymbolMap.inc | 35 +++++++++++++++-
 .../Inclusions/Stdlib/StdSymbolMap.inc        | 42 +++++++++++--------
 2 files changed, 58 insertions(+), 19 deletions(-)

diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index 13060a0cc1d529..a6801525030c48 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -232,6 +232,34 @@ SYMBOL(ssize, std::, <string_view>)
 SYMBOL(ssize, std::, <unordered_map>)
 SYMBOL(ssize, std::, <unordered_set>)
 SYMBOL(ssize, std::, <vector>)
+// C++ [range.access.general]: ... the customization point objects in [range.access]
+// are available when the header <iterator> is included.
+SYMBOL(begin, std::ranges::, <ranges>)
+SYMBOL(begin, std::ranges::, <iterator>)
+SYMBOL(cbegin, std::ranges::, <ranges>)
+SYMBOL(cbegin, std::ranges::, <iterator>)
+SYMBOL(cdata, std::ranges::, <ranges>)
+SYMBOL(cdata, std::ranges::, <iterator>)
+SYMBOL(cend, std::ranges::, <ranges>)
+SYMBOL(cend, std::ranges::, <iterator>)
+SYMBOL(crbegin, std::ranges::, <ranges>)
+SYMBOL(crbegin, std::ranges::, <iterator>)
+SYMBOL(crend, std::ranges::, <ranges>)
+SYMBOL(crend, std::ranges::, <iterator>)
+SYMBOL(data, std::ranges::, <ranges>)
+SYMBOL(data, std::ranges::, <iterator>)
+SYMBOL(empty, std::ranges::, <ranges>)
+SYMBOL(empty, std::ranges::, <iterator>)
+SYMBOL(end, std::ranges::, <ranges>)
+SYMBOL(end, std::ranges::, <iterator>)
+SYMBOL(rbegin, std::ranges::, <ranges>)
+SYMBOL(rbegin, std::ranges::, <iterator>)
+SYMBOL(rend, std::ranges::, <ranges>)
+SYMBOL(rend, std::ranges::, <iterator>)
+SYMBOL(size, std::ranges::, <ranges>)
+SYMBOL(size, std::ranges::, <iterator>)
+SYMBOL(ssize, std::ranges::, <ranges>)
+SYMBOL(ssize, std::ranges::, <iterator>)
 
 // Overloads for different containers, actual header depends on function arg.
 // Probably should use a special handler, like with std::move.
@@ -250,6 +278,9 @@ SYMBOL(erase_if, std::, <set>)
 SYMBOL(erase_if, std::, <deque>)
 SYMBOL(erase_if, std::, <unordered_set>)
 
+// Ignore specializations
+SYMBOL(hash, std::, <functional>)
+
 // Add headers for generic integer-type abs.
 // Ignore other variants (std::complex, std::valarray, std::intmax_t)
 SYMBOL(abs, std::, <cstdlib>)
@@ -441,13 +472,15 @@ SYMBOL(make_error_condition, std::, /*no headers*/)
 
 // cppreference symbol index page was missing these symbols.
 // Remove them when the cppreference offline archive catches up.
-SYMBOL(add_pointer_t, std::, <type_traits>)
 SYMBOL(regular_invocable, std::, <concepts>)
 
 // Symbols missing from the generated symbol map as reported by users.
 // Remove when the generator starts producing them.
 SYMBOL(div, std::, <cstdlib>)
 SYMBOL(abort, std::, <cstdlib>)
+SYMBOL(atomic_wait, std::, <atomic>)
+SYMBOL(atomic_wait_explicit, std::, <atomic>)
+SYMBOL(move_backward, std::, <algorithm>)
 
 // Class declaration was broken, header wasn't rendered.
 // Remove when the cppreference offline archive catches up.
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
index dd35ec3097ad31..2c173088645d46 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
@@ -6,7 +6,7 @@
 // This file was generated automatically by
 // clang/tools/include-mapping/gen_std.py, DO NOT EDIT!
 //
-// Generated from cppreference offline HTML book (modified on 2023-08-11).
+// Generated from cppreference offline HTML book (modified on 2024-06-10).
 //===----------------------------------------------------------------------===//
 
 SYMBOL(ATOMIC_BOOL_LOCK_FREE, None, <atomic>)
@@ -569,6 +569,7 @@ SYMBOL(add_cv_t, std::, <type_traits>)
 SYMBOL(add_lvalue_reference, std::, <type_traits>)
 SYMBOL(add_lvalue_reference_t, std::, <type_traits>)
 SYMBOL(add_pointer, std::, <type_traits>)
+SYMBOL(add_pointer_t, std::, <type_traits>)
 SYMBOL(add_rvalue_reference, std::, <type_traits>)
 SYMBOL(add_rvalue_reference_t, std::, <type_traits>)
 SYMBOL(add_volatile, std::, <type_traits>)
@@ -694,8 +695,6 @@ SYMBOL(atomic_notify_one, std::, <atomic>)
 SYMBOL(atomic_ref, std::, <atomic>)
 SYMBOL(atomic_signal_fence, std::, <atomic>)
 SYMBOL(atomic_thread_fence, std::, <atomic>)
-SYMBOL(atomic_wait, std::, <atomic>)
-SYMBOL(atomic_wait_explicit, std::, <atomic>)
 SYMBOL(atto, std::, <ratio>)
 SYMBOL(auto_ptr, std::, <memory>)
 SYMBOL(back_insert_iterator, std::, <iterator>)
@@ -1211,6 +1210,10 @@ SYMBOL(find_if_not, std::, <algorithm>)
 SYMBOL(fisher_f_distribution, std::, <random>)
 SYMBOL(fixed, std::, <ios>)
 SYMBOL(fixed, std::, <iostream>)
+SYMBOL(flat_map, std::, <flat_map>)
+SYMBOL(flat_multimap, std::, <flat_map>)
+SYMBOL(flat_multiset, std::, <flat_set>)
+SYMBOL(flat_set, std::, <flat_set>)
 SYMBOL(float_denorm_style, std::, <limits>)
 SYMBOL(float_round_style, std::, <limits>)
 SYMBOL(float_t, std::, <cmath>)
@@ -1420,7 +1423,6 @@ SYMBOL(has_unique_object_representations, std::, <type_traits>)
 SYMBOL(has_unique_object_representations_v, std::, <type_traits>)
 SYMBOL(has_virtual_destructor, std::, <type_traits>)
 SYMBOL(has_virtual_destructor_v, std::, <type_traits>)
-SYMBOL(hash, std::, <functional>)
 SYMBOL(hecto, std::, <ratio>)
 SYMBOL(hermite, std::, <cmath>)
 SYMBOL(hermitef, std::, <cmath>)
@@ -1629,6 +1631,7 @@ SYMBOL(is_gt, std::, <compare>)
 SYMBOL(is_gteq, std::, <compare>)
 SYMBOL(is_heap, std::, <algorithm>)
 SYMBOL(is_heap_until, std::, <algorithm>)
+SYMBOL(is_implicit_lifetime, std::, <type_traits>)
 SYMBOL(is_integral, std::, <type_traits>)
 SYMBOL(is_integral_v, std::, <type_traits>)
 SYMBOL(is_invocable, std::, <type_traits>)
@@ -1747,6 +1750,7 @@ SYMBOL(is_void, std::, <type_traits>)
 SYMBOL(is_void_v, std::, <type_traits>)
 SYMBOL(is_volatile, std::, <type_traits>)
 SYMBOL(is_volatile_v, std::, <type_traits>)
+SYMBOL(is_within_lifetime, std::, <type_traits>)
 SYMBOL(isalnum, std::, <cctype>)
 SYMBOL(isalnum, None, <cctype>)
 SYMBOL(isalnum, None, <ctype.h>)
@@ -1812,6 +1816,7 @@ SYMBOL(istreambuf_iterator, std::, <iosfwd>)
 SYMBOL(istringstream, std::, <sstream>)
 SYMBOL(istringstream, std::, <iosfwd>)
 SYMBOL(istrstream, std::, <strstream>)
+SYMBOL(istrstream, std::, <strstream>)
 SYMBOL(isunordered, std::, <cmath>)
 SYMBOL(isunordered, None, <cmath>)
 SYMBOL(isunordered, None, <math.h>)
@@ -1885,6 +1890,9 @@ SYMBOL(laguerrel, std::, <cmath>)
 SYMBOL(latch, std::, <latch>)
 SYMBOL(launch, std::, <future>)
 SYMBOL(launder, std::, <new>)
+SYMBOL(layout_left, std::, <mdspan>)
+SYMBOL(layout_right, std::, <mdspan>)
+SYMBOL(layout_stride, std::, <mdspan>)
 SYMBOL(lcm, std::, <numeric>)
 SYMBOL(lconv, std::, <clocale>)
 SYMBOL(lconv, None, <clocale>)
@@ -2161,7 +2169,6 @@ SYMBOL(moneypunct, std::, <locale>)
 SYMBOL(moneypunct_byname, std::, <locale>)
 SYMBOL(monostate, std::, <variant>)
 SYMBOL(movable, std::, <concepts>)
-SYMBOL(move_backward, std::, <algorithm>)
 SYMBOL(move_constructible, std::, <concepts>)
 SYMBOL(move_if_noexcept, std::, <utility>)
 SYMBOL(move_iterator, std::, <iterator>)
@@ -2265,6 +2272,7 @@ SYMBOL(oct, std::, <iostream>)
 SYMBOL(ofstream, std::, <fstream>)
 SYMBOL(ofstream, std::, <iosfwd>)
 SYMBOL(once_flag, std::, <mutex>)
+SYMBOL(op, std::, <functional>)
 SYMBOL(open_mode, std::, <ios>)
 SYMBOL(open_mode, std::, <iostream>)
 SYMBOL(optional, std::, <optional>)
@@ -2276,6 +2284,7 @@ SYMBOL(ostreambuf_iterator, std::, <iosfwd>)
 SYMBOL(ostringstream, std::, <sstream>)
 SYMBOL(ostringstream, std::, <iosfwd>)
 SYMBOL(ostrstream, std::, <strstream>)
+SYMBOL(ostrstream, std::, <strstream>)
 SYMBOL(osyncstream, std::, <syncstream>)
 SYMBOL(osyncstream, std::, <iosfwd>)
 SYMBOL(out_of_range, std::, <stdexcept>)
@@ -2356,6 +2365,8 @@ SYMBOL(putwchar, None, <wchar.h>)
 SYMBOL(qsort, std::, <cstdlib>)
 SYMBOL(qsort, None, <cstdlib>)
 SYMBOL(qsort, None, <stdlib.h>)
+SYMBOL(quecto, std::, <ratio>)
+SYMBOL(quetta, std::, <ratio>)
 SYMBOL(queue, std::, <queue>)
 SYMBOL(quick_exit, std::, <cstdlib>)
 SYMBOL(quick_exit, None, <cstdlib>)
@@ -2404,6 +2415,8 @@ SYMBOL(recursive_mutex, std::, <mutex>)
 SYMBOL(recursive_timed_mutex, std::, <mutex>)
 SYMBOL(reduce, std::, <numeric>)
 SYMBOL(ref, std::, <functional>)
+SYMBOL(reference_constructs_from_temporary, std::, <type_traits>)
+SYMBOL(reference_converts_from_temporary, std::, <type_traits>)
 SYMBOL(reference_wrapper, std::, <functional>)
 SYMBOL(regex, std::, <regex>)
 SYMBOL(regex_error, std::, <regex>)
@@ -2416,6 +2429,7 @@ SYMBOL(regex_traits, std::, <regex>)
 SYMBOL(regular, std::, <concepts>)
 SYMBOL(reinterpret_pointer_cast, std::, <memory>)
 SYMBOL(relation, std::, <concepts>)
+SYMBOL(relaxed, std::, <memory>)
 SYMBOL(remainder, std::, <cmath>)
 SYMBOL(remainder, None, <cmath>)
 SYMBOL(remainder, None, <math.h>)
@@ -2486,6 +2500,8 @@ SYMBOL(rintf, None, <math.h>)
 SYMBOL(rintl, std::, <cmath>)
 SYMBOL(rintl, None, <cmath>)
 SYMBOL(rintl, None, <math.h>)
+SYMBOL(ronna, std::, <ratio>)
+SYMBOL(ronto, std::, <ratio>)
 SYMBOL(rotate, std::, <algorithm>)
 SYMBOL(rotate_copy, std::, <algorithm>)
 SYMBOL(rotl, std::, <bit>)
@@ -2654,6 +2670,7 @@ SYMBOL(stable_sort, std::, <algorithm>)
 SYMBOL(stack, std::, <stack>)
 SYMBOL(stacktrace, std::, <stacktrace>)
 SYMBOL(stacktrace_entry, std::, <stacktrace>)
+SYMBOL(start_lifetime_as, std::, <memory>)
 SYMBOL(static_pointer_cast, std::, <memory>)
 SYMBOL(stod, std::, <string>)
 SYMBOL(stof, std::, <string>)
@@ -2732,6 +2749,8 @@ SYMBOL(strstr, std::, <cstring>)
 SYMBOL(strstr, None, <cstring>)
 SYMBOL(strstr, None, <string.h>)
 SYMBOL(strstream, std::, <strstream>)
+SYMBOL(strstream, std::, <strstream>)
+SYMBOL(strstreambuf, std::, <strstream>)
 SYMBOL(strstreambuf, std::, <strstream>)
 SYMBOL(strtod, std::, <cstdlib>)
 SYMBOL(strtod, None, <cstdlib>)
@@ -3482,16 +3501,12 @@ SYMBOL(any_of, std::ranges::, <algorithm>)
 SYMBOL(as_const_view, std::ranges::, <ranges>)
 SYMBOL(as_rvalue_view, std::ranges::, <ranges>)
 SYMBOL(basic_istream_view, std::ranges::, <ranges>)
-SYMBOL(begin, std::ranges::, <ranges>)
 SYMBOL(bidirectional_range, std::ranges::, <ranges>)
 SYMBOL(binary_transform_result, std::ranges::, <algorithm>)
 SYMBOL(borrowed_iterator_t, std::ranges::, <ranges>)
 SYMBOL(borrowed_range, std::ranges::, <ranges>)
 SYMBOL(borrowed_subrange_t, std::ranges::, <ranges>)
 SYMBOL(cartesian_product_view, std::ranges::, <ranges>)
-SYMBOL(cbegin, std::ranges::, <ranges>)
-SYMBOL(cdata, std::ranges::, <ranges>)
-SYMBOL(cend, std::ranges::, <ranges>)
 SYMBOL(chunk_by_view, std::ranges::, <ranges>)
 SYMBOL(chunk_view, std::ranges::, <ranges>)
 SYMBOL(clamp, std::ranges::, <algorithm>)
@@ -3513,10 +3528,7 @@ SYMBOL(copy_n_result, std::ranges::, <algorithm>)
 SYMBOL(copy_result, std::ranges::, <algorithm>)
 SYMBOL(count, std::ranges::, <algorithm>)
 SYMBOL(count_if, std::ranges::, <algorithm>)
-SYMBOL(crbegin, std::ranges::, <ranges>)
-SYMBOL(crend, std::ranges::, <ranges>)
 SYMBOL(dangling, std::ranges::, <ranges>)
-SYMBOL(data, std::ranges::, <ranges>)
 SYMBOL(destroy, std::ranges::, <memory>)
 SYMBOL(destroy_at, std::ranges::, <memory>)
 SYMBOL(destroy_n, std::ranges::, <memory>)
@@ -3525,11 +3537,9 @@ SYMBOL(distance, std::ranges::, <iterator>)
 SYMBOL(drop_view, std::ranges::, <ranges>)
 SYMBOL(drop_while_view, std::ranges::, <ranges>)
 SYMBOL(elements_view, std::ranges::, <ranges>)
-SYMBOL(empty, std::ranges::, <ranges>)
 SYMBOL(empty_view, std::ranges::, <ranges>)
 SYMBOL(enable_borrowed_range, std::ranges::, <ranges>)
 SYMBOL(enable_view, std::ranges::, <ranges>)
-SYMBOL(end, std::ranges::, <ranges>)
 SYMBOL(ends_with, std::ranges::, <algorithm>)
 SYMBOL(equal, std::ranges::, <algorithm>)
 SYMBOL(equal_to, std::ranges::, <functional>)
@@ -3638,7 +3648,6 @@ SYMBOL(range_reference_t, std::ranges::, <ranges>)
 SYMBOL(range_rvalue_reference_t, std::ranges::, <ranges>)
 SYMBOL(range_size_t, std::ranges::, <ranges>)
 SYMBOL(range_value_t, std::ranges::, <ranges>)
-SYMBOL(rbegin, std::ranges::, <ranges>)
 SYMBOL(ref_view, std::ranges::, <ranges>)
 SYMBOL(remove, std::ranges::, <algorithm>)
 SYMBOL(remove_copy, std::ranges::, <algorithm>)
@@ -3646,7 +3655,6 @@ SYMBOL(remove_copy_if, std::ranges::, <algorithm>)
 SYMBOL(remove_copy_if_result, std::ranges::, <algorithm>)
 SYMBOL(remove_copy_result, std::ranges::, <algorithm>)
 SYMBOL(remove_if, std::ranges::, <algorithm>)
-SYMBOL(rend, std::ranges::, <ranges>)
 SYMBOL(repeat_view, std::ranges::, <ranges>)
 SYMBOL(replace, std::ranges::, <algorithm>)
 SYMBOL(replace_copy, std::ranges::, <algorithm>)
@@ -3677,13 +3685,11 @@ SYMBOL(shift_left, std::ranges::, <algorithm>)
 SYMBOL(shift_right, std::ranges::, <algorithm>)
 SYMBOL(shuffle, std::ranges::, <algorithm>)
 SYMBOL(single_view, std::ranges::, <ranges>)
-SYMBOL(size, std::ranges::, <ranges>)
 SYMBOL(sized_range, std::ranges::, <ranges>)
 SYMBOL(slide_view, std::ranges::, <ranges>)
 SYMBOL(sort, std::ranges::, <algorithm>)
 SYMBOL(sort_heap, std::ranges::, <algorithm>)
 SYMBOL(split_view, std::ranges::, <ranges>)
-SYMBOL(ssize, std::ranges::, <ranges>)
 SYMBOL(stable_partition, std::ranges::, <algorithm>)
 SYMBOL(stable_sort, std::ranges::, <algorithm>)
 SYMBOL(starts_with, std::ranges::, <algorithm>)

>From 0879671197e1d74a88e4322a4d3e551236db5217 Mon Sep 17 00:00:00 2001
From: vvd170501 <36827317+vvd170501 at users.noreply.github.com>
Date: Sat, 26 Oct 2024 00:17:26 +0300
Subject: [PATCH 3/6] Fix variant parsing

---
 .../include-mapping/cppreference_parser.py    | 23 +++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/clang/tools/include-mapping/cppreference_parser.py b/clang/tools/include-mapping/cppreference_parser.py
index f2ea55384fac80..ff8d16bd792b33 100644
--- a/clang/tools/include-mapping/cppreference_parser.py
+++ b/clang/tools/include-mapping/cppreference_parser.py
@@ -7,7 +7,7 @@
 #
 # ===------------------------------------------------------------------------===#
 
-from bs4 import BeautifulSoup, NavigableString
+from bs4 import BeautifulSoup, NavigableString, Tag
 
 import collections
 import multiprocessing
@@ -89,6 +89,23 @@ def _ParseSymbolPage(symbol_page_html, symbol_name):
     return headers or all_headers
 
 
+def _ParseSymbolVariant(caption):
+    if not (isinstance(caption, NavigableString) and "(" in caption):
+        return None
+
+    if ')' in caption.text:  # (locale), (algorithm), etc.
+        return caption.text.strip(" ()")
+
+    second_part = caption.next_sibling
+    if isinstance(second_part, Tag) and second_part.name == "code":
+        # (<code>std::complex</code>), etc.
+        third_part = second_part.next_sibling
+        if isinstance(third_part, NavigableString) and third_part.text.startswith(')'):
+            return second_part.text
+    return None
+
+
+
 def _ParseIndexPage(index_page_html):
     """Parse index page.
     The index page lists all std symbols and hrefs to their detailed pages
@@ -107,9 +124,7 @@ def _ParseIndexPage(index_page_html):
         # This accidentally accepts begin/end despite the (iterator) caption: the
         # (since C++11) note is first. They are good symbols, so the bug is unfixed.
         caption = symbol_href.next_sibling
-        variant = None
-        if isinstance(caption, NavigableString) and "(" in caption:
-            variant = caption.text.strip(" ()")
+        variant = _ParseSymbolVariant(caption)
         symbol_tt = symbol_href.find("tt")
         if symbol_tt:
             symbols.append(

>From 90f9e7221c3c29ef9385fb57d2a22da0b4c759b7 Mon Sep 17 00:00:00 2001
From: vvd170501 <36827317+vvd170501 at users.noreply.github.com>
Date: Sat, 26 Oct 2024 00:30:00 +0300
Subject: [PATCH 4/6] Regenerate wwith variants fix

---
 .../Inclusions/Stdlib/StdSpecialSymbolMap.inc | 79 +++----------------
 .../Inclusions/Stdlib/StdSymbolMap.inc        | 73 +++++++++++++++--
 2 files changed, 76 insertions(+), 76 deletions(-)

diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index a6801525030c48..b1dbfdae25c434 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -263,6 +263,7 @@ SYMBOL(ssize, std::ranges::, <iterator>)
 
 // Overloads for different containers, actual header depends on function arg.
 // Probably should use a special handler, like with std::move.
+// FIXME remove header?
 SYMBOL(erase, std::, <vector>)
 SYMBOL(erase, std::, <deque>)
 SYMBOL(erase, std::, <string>)
@@ -278,6 +279,16 @@ SYMBOL(erase_if, std::, <set>)
 SYMBOL(erase_if, std::, <deque>)
 SYMBOL(erase_if, std::, <unordered_set>)
 
+// FIXME lost after generator update
+SYMBOL(abs, std::chrono::, <chrono>)
+SYMBOL(ceil, std::chrono::, <chrono>)
+SYMBOL(floor, std::chrono::, <chrono>)
+SYMBOL(from_stream, std::chrono::, <chrono>)
+SYMBOL(round, std::chrono::, <chrono>)
+SYMBOL(begin, std::filesystem::, <filesystem>)
+SYMBOL(end, std::filesystem::, <filesystem>)
+SYMBOL(get, std::ranges::, <ranges>)-
+
 // Ignore specializations
 SYMBOL(hash, std::, <functional>)
 
@@ -290,77 +301,9 @@ SYMBOL(abs, None, <stdlib.h>)
 SYMBOL(abs, None, <cmath>)
 SYMBOL(abs, None, <math.h>)
 
-// Same as abs - ignore variants (std::complex, std::valarray)
-SYMBOL(acos, std::, <cmath>)
-SYMBOL(acos, None, <cmath>)
-SYMBOL(acos, None, <math.h>)
-SYMBOL(acosh, std::, <cmath>)
-SYMBOL(acosh, None, <cmath>)
-SYMBOL(acosh, None, <math.h>)
-SYMBOL(asin, std::, <cmath>)
-SYMBOL(asin, None, <cmath>)
-SYMBOL(asin, None, <math.h>)
-SYMBOL(asinh, std::, <cmath>)
-SYMBOL(asinh, None, <cmath>)
-SYMBOL(asinh, None, <math.h>)
-SYMBOL(atan, std::, <cmath>)
-SYMBOL(atan, None, <cmath>)
-SYMBOL(atan, None, <math.h>)
-SYMBOL(atan2, std::, <cmath>)
-SYMBOL(atan2, None, <cmath>)
-SYMBOL(atan2, None, <math.h>)
-SYMBOL(atanh, std::, <cmath>)
-SYMBOL(atanh, None, <cmath>)
-SYMBOL(atanh, None, <math.h>)
-SYMBOL(cos, std::, <cmath>)
-SYMBOL(cos, None, <cmath>)
-SYMBOL(cos, None, <math.h>)
-SYMBOL(cosh, std::, <cmath>)
-SYMBOL(cosh, None, <cmath>)
-SYMBOL(cosh, None, <math.h>)
-SYMBOL(exp, std::, <cmath>)
-SYMBOL(exp, None, <cmath>)
-SYMBOL(exp, None, <math.h>)
-SYMBOL(log, std::, <cmath>)
-SYMBOL(log, None, <cmath>)
-SYMBOL(log, None, <math.h>)
-SYMBOL(log10, std::, <cmath>)
-SYMBOL(log10, None, <cmath>)
-SYMBOL(log10, None, <math.h>)
-SYMBOL(pow, std::, <cmath>)
-SYMBOL(pow, None, <cmath>)
-SYMBOL(pow, None, <math.h>)
-SYMBOL(sin, std::, <cmath>)
-SYMBOL(sin, None, <cmath>)
-SYMBOL(sin, None, <math.h>)
-SYMBOL(sinh, std::, <cmath>)
-SYMBOL(sinh, None, <cmath>)
-SYMBOL(sinh, None, <math.h>)
-SYMBOL(sqrt, std::, <cmath>)
-SYMBOL(sqrt, None, <cmath>)
-SYMBOL(sqrt, None, <math.h>)
-SYMBOL(tan, std::, <cmath>)
-SYMBOL(tan, None, <cmath>)
-SYMBOL(tan, None, <math.h>)
-SYMBOL(tanh, std::, <cmath>)
-SYMBOL(tanh, None, <cmath>)
-SYMBOL(tanh, None, <math.h>)
-
 // Only add headers for the generic atomic template
-// and atomic_* template functions.
 // Ignore variants (std::weak_ptr, std::shared_ptr).
 SYMBOL(atomic, std::, <atomic>)
-SYMBOL(atomic_compare_exchange_strong, std::, <atomic>)
-SYMBOL(atomic_compare_exchange_strong_explicit, std::, <atomic>)
-SYMBOL(atomic_compare_exchange_weak, std::, <atomic>)
-SYMBOL(atomic_compare_exchange_weak_explicit, std::, <atomic>)
-SYMBOL(atomic_exchange, std::, <atomic>)
-SYMBOL(atomic_exchange_explicit, std::, <atomic>)
-SYMBOL(atomic_is_lock_free, std::, <atomic>)
-SYMBOL(atomic_load, std::, <atomic>)
-SYMBOL(atomic_load_explicit, std::, <atomic>)
-SYMBOL(atomic_store, std::, <atomic>)
-SYMBOL(atomic_store_explicit, std::, <atomic>)
 
 // atomic_* family symbols. <stdatomic.h> is for C compatibility.
 SYMBOL(atomic_bool, std::, <atomic>)
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
index 2c173088645d46..de1434eb7acacc 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
@@ -550,9 +550,15 @@ SYMBOL(_Exit, std::, <cstdlib>)
 SYMBOL(_Exit, None, <cstdlib>)
 SYMBOL(_Exit, None, <stdlib.h>)
 SYMBOL(accumulate, std::, <numeric>)
+SYMBOL(acos, std::, <cmath>)
+SYMBOL(acos, None, <cmath>)
+SYMBOL(acos, None, <math.h>)
 SYMBOL(acosf, std::, <cmath>)
 SYMBOL(acosf, None, <cmath>)
 SYMBOL(acosf, None, <math.h>)
+SYMBOL(acosh, std::, <cmath>)
+SYMBOL(acosh, None, <cmath>)
+SYMBOL(acosh, None, <math.h>)
 SYMBOL(acoshf, std::, <cmath>)
 SYMBOL(acoshf, None, <cmath>)
 SYMBOL(acoshf, None, <math.h>)
@@ -611,9 +617,15 @@ SYMBOL(as_writable_bytes, std::, <span>)
 SYMBOL(asctime, std::, <ctime>)
 SYMBOL(asctime, None, <ctime>)
 SYMBOL(asctime, None, <time.h>)
+SYMBOL(asin, std::, <cmath>)
+SYMBOL(asin, None, <cmath>)
+SYMBOL(asin, None, <math.h>)
 SYMBOL(asinf, std::, <cmath>)
 SYMBOL(asinf, None, <cmath>)
 SYMBOL(asinf, None, <math.h>)
+SYMBOL(asinh, std::, <cmath>)
+SYMBOL(asinh, None, <cmath>)
+SYMBOL(asinh, None, <math.h>)
 SYMBOL(asinhf, std::, <cmath>)
 SYMBOL(asinhf, None, <cmath>)
 SYMBOL(asinhf, None, <math.h>)
@@ -635,6 +647,12 @@ SYMBOL(async, std::, <future>)
 SYMBOL(at_quick_exit, std::, <cstdlib>)
 SYMBOL(at_quick_exit, None, <cstdlib>)
 SYMBOL(at_quick_exit, None, <stdlib.h>)
+SYMBOL(atan, std::, <cmath>)
+SYMBOL(atan, None, <cmath>)
+SYMBOL(atan, None, <math.h>)
+SYMBOL(atan2, std::, <cmath>)
+SYMBOL(atan2, None, <cmath>)
+SYMBOL(atan2, None, <math.h>)
 SYMBOL(atan2f, std::, <cmath>)
 SYMBOL(atan2f, None, <cmath>)
 SYMBOL(atan2f, None, <math.h>)
@@ -644,6 +662,9 @@ SYMBOL(atan2l, None, <math.h>)
 SYMBOL(atanf, std::, <cmath>)
 SYMBOL(atanf, None, <cmath>)
 SYMBOL(atanf, None, <math.h>)
+SYMBOL(atanh, std::, <cmath>)
+SYMBOL(atanh, None, <cmath>)
+SYMBOL(atanh, None, <math.h>)
 SYMBOL(atanhf, std::, <cmath>)
 SYMBOL(atanhf, None, <cmath>)
 SYMBOL(atanhf, None, <math.h>)
@@ -668,6 +689,12 @@ SYMBOL(atol, None, <stdlib.h>)
 SYMBOL(atoll, std::, <cstdlib>)
 SYMBOL(atoll, None, <cstdlib>)
 SYMBOL(atoll, None, <stdlib.h>)
+SYMBOL(atomic_compare_exchange_strong, std::, <atomic>)
+SYMBOL(atomic_compare_exchange_strong_explicit, std::, <atomic>)
+SYMBOL(atomic_compare_exchange_weak, std::, <atomic>)
+SYMBOL(atomic_compare_exchange_weak_explicit, std::, <atomic>)
+SYMBOL(atomic_exchange, std::, <atomic>)
+SYMBOL(atomic_exchange_explicit, std::, <atomic>)
 SYMBOL(atomic_fetch_add, std::, <atomic>)
 SYMBOL(atomic_fetch_add_explicit, std::, <atomic>)
 SYMBOL(atomic_fetch_and, std::, <atomic>)
@@ -690,10 +717,15 @@ SYMBOL(atomic_flag_test_explicit, std::, <atomic>)
 SYMBOL(atomic_flag_wait, std::, <atomic>)
 SYMBOL(atomic_flag_wait_explicit, std::, <atomic>)
 SYMBOL(atomic_init, std::, <atomic>)
+SYMBOL(atomic_is_lock_free, std::, <atomic>)
+SYMBOL(atomic_load, std::, <atomic>)
+SYMBOL(atomic_load_explicit, std::, <atomic>)
 SYMBOL(atomic_notify_all, std::, <atomic>)
 SYMBOL(atomic_notify_one, std::, <atomic>)
 SYMBOL(atomic_ref, std::, <atomic>)
 SYMBOL(atomic_signal_fence, std::, <atomic>)
+SYMBOL(atomic_store, std::, <atomic>)
+SYMBOL(atomic_store_explicit, std::, <atomic>)
 SYMBOL(atomic_thread_fence, std::, <atomic>)
 SYMBOL(atto, std::, <ratio>)
 SYMBOL(auto_ptr, std::, <memory>)
@@ -930,9 +962,15 @@ SYMBOL(copysignl, None, <cmath>)
 SYMBOL(copysignl, None, <math.h>)
 SYMBOL(coroutine_handle, std::, <coroutine>)
 SYMBOL(coroutine_traits, std::, <coroutine>)
+SYMBOL(cos, std::, <cmath>)
+SYMBOL(cos, None, <cmath>)
+SYMBOL(cos, None, <math.h>)
 SYMBOL(cosf, std::, <cmath>)
 SYMBOL(cosf, None, <cmath>)
 SYMBOL(cosf, None, <math.h>)
+SYMBOL(cosh, std::, <cmath>)
+SYMBOL(cosh, None, <cmath>)
+SYMBOL(cosh, None, <math.h>)
 SYMBOL(coshf, std::, <cmath>)
 SYMBOL(coshf, None, <cmath>)
 SYMBOL(coshf, None, <math.h>)
@@ -1081,6 +1119,9 @@ SYMBOL(exclusive_scan, std::, <numeric>)
 SYMBOL(exit, std::, <cstdlib>)
 SYMBOL(exit, None, <cstdlib>)
 SYMBOL(exit, None, <stdlib.h>)
+SYMBOL(exp, std::, <cmath>)
+SYMBOL(exp, None, <cmath>)
+SYMBOL(exp, None, <math.h>)
 SYMBOL(exp2, std::, <cmath>)
 SYMBOL(exp2, None, <cmath>)
 SYMBOL(exp2, None, <math.h>)
@@ -1970,6 +2011,12 @@ SYMBOL(localtime, None, <ctime>)
 SYMBOL(localtime, None, <time.h>)
 SYMBOL(lock, std::, <mutex>)
 SYMBOL(lock_guard, std::, <mutex>)
+SYMBOL(log, std::, <cmath>)
+SYMBOL(log, None, <cmath>)
+SYMBOL(log, None, <math.h>)
+SYMBOL(log10, std::, <cmath>)
+SYMBOL(log10, None, <cmath>)
+SYMBOL(log10, None, <math.h>)
 SYMBOL(log10f, std::, <cmath>)
 SYMBOL(log10f, None, <cmath>)
 SYMBOL(log10f, None, <math.h>)
@@ -2321,6 +2368,9 @@ SYMBOL(poisson_distribution, std::, <random>)
 SYMBOL(polar, std::, <complex>)
 SYMBOL(pop_heap, std::, <algorithm>)
 SYMBOL(popcount, std::, <bit>)
+SYMBOL(pow, std::, <cmath>)
+SYMBOL(pow, None, <cmath>)
+SYMBOL(pow, None, <math.h>)
 SYMBOL(powf, std::, <cmath>)
 SYMBOL(powf, None, <cmath>)
 SYMBOL(powf, None, <math.h>)
@@ -2602,9 +2652,15 @@ SYMBOL(signbit, std::, <cmath>)
 SYMBOL(signbit, None, <cmath>)
 SYMBOL(signbit, None, <math.h>)
 SYMBOL(signed_integral, std::, <concepts>)
+SYMBOL(sin, std::, <cmath>)
+SYMBOL(sin, None, <cmath>)
+SYMBOL(sin, None, <math.h>)
 SYMBOL(sinf, std::, <cmath>)
 SYMBOL(sinf, None, <cmath>)
 SYMBOL(sinf, None, <math.h>)
+SYMBOL(sinh, std::, <cmath>)
+SYMBOL(sinh, None, <cmath>)
+SYMBOL(sinh, None, <math.h>)
 SYMBOL(sinhf, std::, <cmath>)
 SYMBOL(sinhf, None, <cmath>)
 SYMBOL(sinhf, None, <math.h>)
@@ -2650,6 +2706,9 @@ SYMBOL(sph_neumannl, std::, <cmath>)
 SYMBOL(sprintf, std::, <cstdio>)
 SYMBOL(sprintf, None, <cstdio>)
 SYMBOL(sprintf, None, <stdio.h>)
+SYMBOL(sqrt, std::, <cmath>)
+SYMBOL(sqrt, None, <cmath>)
+SYMBOL(sqrt, None, <math.h>)
 SYMBOL(sqrtf, std::, <cmath>)
 SYMBOL(sqrtf, None, <cmath>)
 SYMBOL(sqrtf, None, <math.h>)
@@ -2806,9 +2865,15 @@ SYMBOL(system, None, <cstdlib>)
 SYMBOL(system, None, <stdlib.h>)
 SYMBOL(system_category, std::, <system_error>)
 SYMBOL(system_error, std::, <system_error>)
+SYMBOL(tan, std::, <cmath>)
+SYMBOL(tan, None, <cmath>)
+SYMBOL(tan, None, <math.h>)
 SYMBOL(tanf, std::, <cmath>)
 SYMBOL(tanf, None, <cmath>)
 SYMBOL(tanf, None, <math.h>)
+SYMBOL(tanh, std::, <cmath>)
+SYMBOL(tanh, None, <cmath>)
+SYMBOL(tanh, None, <math.h>)
 SYMBOL(tanhf, std::, <cmath>)
 SYMBOL(tanhf, None, <cmath>)
 SYMBOL(tanhf, None, <math.h>)
@@ -3285,9 +3350,7 @@ SYMBOL(Sunday, std::chrono::, <chrono>)
 SYMBOL(Thursday, std::chrono::, <chrono>)
 SYMBOL(Tuesday, std::chrono::, <chrono>)
 SYMBOL(Wednesday, std::chrono::, <chrono>)
-SYMBOL(abs, std::chrono::, <chrono>)
 SYMBOL(ambiguous_local_time, std::chrono::, <chrono>)
-SYMBOL(ceil, std::chrono::, <chrono>)
 SYMBOL(choose, std::chrono::, <chrono>)
 SYMBOL(clock_cast, std::chrono::, <chrono>)
 SYMBOL(clock_time_conversion, std::chrono::, <chrono>)
@@ -3299,8 +3362,6 @@ SYMBOL(duration_values, std::chrono::, <chrono>)
 SYMBOL(file_clock, std::chrono::, <chrono>)
 SYMBOL(file_seconds, std::chrono::, <chrono>)
 SYMBOL(file_time, std::chrono::, <chrono>)
-SYMBOL(floor, std::chrono::, <chrono>)
-SYMBOL(from_stream, std::chrono::, <chrono>)
 SYMBOL(get_leap_second_info, std::chrono::, <chrono>)
 SYMBOL(gps_clock, std::chrono::, <chrono>)
 SYMBOL(gps_seconds, std::chrono::, <chrono>)
@@ -3334,7 +3395,6 @@ SYMBOL(month_weekday_last, std::chrono::, <chrono>)
 SYMBOL(nanoseconds, std::chrono::, <chrono>)
 SYMBOL(nonexistent_local_time, std::chrono::, <chrono>)
 SYMBOL(parse, std::chrono::, <chrono>)
-SYMBOL(round, std::chrono::, <chrono>)
 SYMBOL(seconds, std::chrono::, <chrono>)
 SYMBOL(steady_clock, std::chrono::, <chrono>)
 SYMBOL(sys_days, std::chrono::, <chrono>)
@@ -3377,7 +3437,6 @@ SYMBOL(sequenced_policy, std::execution::, <execution>)
 SYMBOL(unseq, std::execution::, <execution>)
 SYMBOL(unsequenced_policy, std::execution::, <execution>)
 SYMBOL(absolute, std::filesystem::, <filesystem>)
-SYMBOL(begin, std::filesystem::, <filesystem>)
 SYMBOL(canonical, std::filesystem::, <filesystem>)
 SYMBOL(copy, std::filesystem::, <filesystem>)
 SYMBOL(copy_file, std::filesystem::, <filesystem>)
@@ -3392,7 +3451,6 @@ SYMBOL(current_path, std::filesystem::, <filesystem>)
 SYMBOL(directory_entry, std::filesystem::, <filesystem>)
 SYMBOL(directory_iterator, std::filesystem::, <filesystem>)
 SYMBOL(directory_options, std::filesystem::, <filesystem>)
-SYMBOL(end, std::filesystem::, <filesystem>)
 SYMBOL(equivalent, std::filesystem::, <filesystem>)
 SYMBOL(exists, std::filesystem::, <filesystem>)
 SYMBOL(file_size, std::filesystem::, <filesystem>)
@@ -3567,7 +3625,6 @@ SYMBOL(for_each_result, std::ranges::, <algorithm>)
 SYMBOL(forward_range, std::ranges::, <ranges>)
 SYMBOL(generate, std::ranges::, <algorithm>)
 SYMBOL(generate_n, std::ranges::, <algorithm>)
-SYMBOL(get, std::ranges::, <ranges>)
 SYMBOL(greater, std::ranges::, <functional>)
 SYMBOL(greater_equal, std::ranges::, <functional>)
 SYMBOL(in_found_result, std::ranges::, <algorithm>)

>From 0a8fd7875fcd8c15eace06fdce629a4270eeb769 Mon Sep 17 00:00:00 2001
From: vvd170501 <36827317+vvd170501 at users.noreply.github.com>
Date: Sat, 26 Oct 2024 00:31:09 +0300
Subject: [PATCH 5/6] Add comment

---
 clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index b1dbfdae25c434..62a0bf8637c1ec 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -429,8 +429,8 @@ SYMBOL(move_backward, std::, <algorithm>)
 // Remove when the cppreference offline archive catches up.
 SYMBOL(month_weekday, std::chrono::, <chrono>)
 
-// FIXME Ambiguous symbols
-// Not sure if they should be updated, this is copied from v20220730
+// FIXME Ambiguous symbols - incorrectly parsing headers when symbols are
+// written with ns
 SYMBOL(filebuf, std::, <streambuf>)
 SYMBOL(filebuf, std::, <iostream>)
 SYMBOL(filebuf, std::, <iosfwd>)

>From 49ae5c01a82bc901a892941f62c53a7e47a1ecf5 Mon Sep 17 00:00:00 2001
From: vvd170501 <36827317+vvd170501 at users.noreply.github.com>
Date: Sat, 26 Oct 2024 00:33:23 +0300
Subject: [PATCH 6/6] Formatting

---
 clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index 62a0bf8637c1ec..05ee91287bd106 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -232,8 +232,8 @@ SYMBOL(ssize, std::, <string_view>)
 SYMBOL(ssize, std::, <unordered_map>)
 SYMBOL(ssize, std::, <unordered_set>)
 SYMBOL(ssize, std::, <vector>)
-// C++ [range.access.general]: ... the customization point objects in [range.access]
-// are available when the header <iterator> is included.
+// C++ [range.access.general]: ... the customization point objects
+// in [range.access] are available when the header <iterator> is included.
 SYMBOL(begin, std::ranges::, <ranges>)
 SYMBOL(begin, std::ranges::, <iterator>)
 SYMBOL(cbegin, std::ranges::, <ranges>)
@@ -287,7 +287,7 @@ SYMBOL(from_stream, std::chrono::, <chrono>)
 SYMBOL(round, std::chrono::, <chrono>)
 SYMBOL(begin, std::filesystem::, <filesystem>)
 SYMBOL(end, std::filesystem::, <filesystem>)
-SYMBOL(get, std::ranges::, <ranges>)-
+SYMBOL(get, std::ranges::, <ranges>)
 
 // Ignore specializations
 SYMBOL(hash, std::, <functional>)



More information about the cfe-commits mailing list