Skip to content

[Tooling/Inclusion] Update std symbols mapping #113612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

vvd170501
Copy link
Contributor

@vvd170501 vvd170501 commented Oct 24, 2024

Fixes #113494

Copy link

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Discourse for more information.

Copy link

github-actions bot commented Oct 24, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@vvd170501 vvd170501 changed the title Update std symbols mapping (fixes #113494) Update std symbols mapping Oct 24, 2024
@vvd170501 vvd170501 force-pushed the update-std-symbols-mapping branch from 28b68b7 to 96662cb Compare October 24, 2024 20:18
Copy link

github-actions bot commented Oct 25, 2024

✅ With the latest revision this PR passed the Python code formatter.

@vvd170501 vvd170501 force-pushed the update-std-symbols-mapping branch from f901991 to eb04dfe Compare October 26, 2024 08:09
@vvd170501 vvd170501 force-pushed the update-std-symbols-mapping branch from eb04dfe to 1894906 Compare October 26, 2024 09:31
@vvd170501 vvd170501 marked this pull request as ready for review October 26, 2024 10:06
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Oct 26, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 26, 2024

@llvm/pr-subscribers-clang

Author: Vadim D. (vvd170501)

Changes

Fixes #113494


Patch is 35.77 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/113612.diff

4 Files Affected:

  • (modified) clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp (+5-3)
  • (modified) clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc (+40-6)
  • (modified) clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc (+93-23)
  • (modified) clang/tools/include-mapping/cppreference_parser.py (+57-24)
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..307118bd650df6 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -232,6 +232,37 @@ 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>)
+
+// Ignore specializations
+SYMBOL(hash, std::, <functional>)
 
 // Add headers for generic integer-type abs.
 // Ignore other variants (std::complex, std::valarray, std::intmax_t)
@@ -352,20 +383,23 @@ SYMBOL(get, std::, /*no headers*/)
 // providing the type.
 SYMBOL(make_error_code, std::, /*no headers*/)
 SYMBOL(make_error_condition, std::, /*no headers*/)
+// Similar to std::get, has variants for multiple containers
+// (vector, deque, list, etc.)
+SYMBOL(erase, std::, /*no headers*/)
+SYMBOL(erase_if, 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(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>)
+SYMBOL(atomic_wait, std::, <atomic>)
+SYMBOL(atomic_wait_explicit, std::, <atomic>)
+SYMBOL(move_backward, std::, <algorithm>)
+SYMBOL(month_weekday, std::chrono::, <chrono>)
 
 // These are C symbols that are not under std namespace.
 SYMBOL(localtime_r, None, <ctime>)
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
index b46bd2e4d7a4b5..b4afd0228694ff 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 2024-06-10).
 //===----------------------------------------------------------------------===//
 
 SYMBOL(ATOMIC_BOOL_LOCK_FREE, None, <atomic>)
@@ -598,7 +598,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 +606,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>)
@@ -727,8 +727,6 @@ 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>)
 SYMBOL(atto, std::, <ratio>)
 SYMBOL(auto_ptr, std::, <memory>)
 SYMBOL(back_insert_iterator, std::, <iterator>)
@@ -738,6 +736,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 +744,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 +933,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>)
@@ -1019,6 +1022,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 +1044,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 +1089,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>)
@@ -1128,6 +1131,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 +1153,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>)
@@ -1249,6 +1254,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>)
@@ -1314,6 +1323,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 +1420,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>)
@@ -1456,7 +1467,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>)
@@ -1510,6 +1520,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>)
@@ -1663,6 +1675,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>)
@@ -1781,6 +1794,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>)
@@ -1849,6 +1863,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>)
@@ -1922,6 +1937,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>)
@@ -2071,10 +2089,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 +2154,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>)
@@ -2198,7 +2222,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>)
@@ -2302,6 +2325,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>)
@@ -2316,6 +2340,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>)
@@ -2365,9 +2390,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>)
@@ -2397,6 +2424,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>)
@@ -2445,6 +2474,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>)
@@ -2455,9 +2486,9 @@ 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(relaxed, std::, <memory>)
 SYMBOL(remainder, std::, <cmath>)
 SYMBOL(remainder, None, <cmath>)
 SYMBOL(remainder, None, <math.h>)
@@ -2528,6 +2559,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>)
@@ -2705,6 +2738,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>)
@@ -2785,6 +2819,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>)
@@ -3017,6 +3053,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 +3126,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>)
@@ -3239,6 +3280,7 @@ 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>)
@@ -3338,6 +3380,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 +3392,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 +3423,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 +3470,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 +3485,7 @@ SYMBOL(current_path, std::filesystem::, <filesystem>)
 SYMBOL(dir...
[truncated]

@vvd170501 vvd170501 changed the title Update std symbols mapping [Tooling/Inclusion] Update std symbols mapping Oct 26, 2024
Copy link
Member

@kadircet kadircet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a ton for the comprehensive change, i think this looks amazing!

can you just move the parser changes into a separate PR and revert changes in the assertion and rather delete the duplicates from stdspecialsymbolmap?

@vvd170501 vvd170501 force-pushed the update-std-symbols-mapping branch from 1894906 to d128cd6 Compare October 30, 2024 03:11
@vvd170501 vvd170501 requested a review from kadircet October 30, 2024 03:23
@vvd170501
Copy link
Contributor Author

I've kept parser changes (excluding optimizations) in this PR, because they are needed for correct parsing of newer cppreference archives.
Without these changes, 93 lines are lost from StdSymbolMap.inc and must be manually added to StdSpecialSymbolMap.inc, resulting in 186 additional lines of diff.

Copy link
Member

@kadircet kadircet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot, lgtm!

LMK if i should commit this for you

@vvd170501
Copy link
Contributor Author

vvd170501 commented Oct 30, 2024

thanks a lot, lgtm!

LMK if i should commit this for you

Yes, commit it please, I don't have the permissions.

UPD: some tests failed, I'm trying to fix them.
UPD2: Done.

…e assertion to detect all ungrouped mappings

(rebase to test with updated StdSpecialSymbolMap.inc)
@vvd170501 vvd170501 force-pushed the update-std-symbols-mapping branch from 2b7b9c7 to 1baa1c2 Compare November 3, 2024 12:42
@vvd170501
Copy link
Contributor Author

@kadircet, ping. Could you commit these changes, please?

I've rebased to make sure that 68daf7d didn't cause any conflicts.

@kadircet kadircet merged commit c0ce44e into llvm:main Nov 4, 2024
8 checks passed
@vvd170501 vvd170501 deleted the update-std-symbols-mapping branch November 4, 2024 15:53
PhilippRados pushed a commit to PhilippRados/llvm-project that referenced this pull request Nov 6, 2024
hokein pushed a commit that referenced this pull request Dec 16, 2024
This adds new symbols to the generated mapping and removes special
mappings for missing symbols introduced in #113612, as these symbols are
now included in the generated mapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[clang-include-cleaner] <expected> incorrectly diagnosed as unused when using libc++ because of outdated StdSymbolMap.inc
3 participants