[clang] [Tooling/Inclusion] Update std symbol mapping (PR #118174)
Vadim D. via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 30 07:28:35 PST 2024
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/118174
>From 4c2d6a11ad6364182e93686f6e0bc8b834355877 Mon Sep 17 00:00:00 2001
From: Vadim Dudkin <vvd170501 at gmail.com>
Date: Sat, 30 Nov 2024 18:09:23 +0300
Subject: [PATCH 1/2] Update std symbol mapping to v20241111
---
.../Inclusions/Stdlib/StdSpecialSymbolMap.inc | 8 ---
.../Inclusions/Stdlib/StdSymbolMap.inc | 56 +++++++++++++++++--
2 files changed, 50 insertions(+), 14 deletions(-)
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index 8f20ce98152f08..22232a34995f2d 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -389,18 +389,10 @@ SYMBOL(make_error_condition, std::, /*no headers*/)
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(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>)
-SYMBOL(month_weekday, std::chrono::, <chrono>)
SYMBOL(binary_search, std::ranges::, <algorithm>)
SYMBOL(equal_range, std::ranges::, <algorithm>)
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
index b4afd0228694ff..c1927180d33976 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 2024-06-10).
+// Generated from cppreference offline HTML book (modified on 2024-11-10).
//===----------------------------------------------------------------------===//
SYMBOL(ATOMIC_BOOL_LOCK_FREE, None, <atomic>)
@@ -578,6 +578,7 @@ 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_sat, std::, <numeric>)
SYMBOL(add_volatile, std::, <type_traits>)
SYMBOL(add_volatile_t, std::, <type_traits>)
SYMBOL(addressof, std::, <memory>)
@@ -699,6 +700,10 @@ SYMBOL(atomic_fetch_add, std::, <atomic>)
SYMBOL(atomic_fetch_add_explicit, std::, <atomic>)
SYMBOL(atomic_fetch_and, std::, <atomic>)
SYMBOL(atomic_fetch_and_explicit, std::, <atomic>)
+SYMBOL(atomic_fetch_max, std::, <atomic>)
+SYMBOL(atomic_fetch_max_explicit, std::, <atomic>)
+SYMBOL(atomic_fetch_min, std::, <atomic>)
+SYMBOL(atomic_fetch_min_explicit, std::, <atomic>)
SYMBOL(atomic_fetch_or, std::, <atomic>)
SYMBOL(atomic_fetch_or_explicit, std::, <atomic>)
SYMBOL(atomic_fetch_sub, std::, <atomic>)
@@ -727,6 +732,8 @@ 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>)
@@ -829,6 +836,8 @@ SYMBOL(boolalpha, std::, <ios>)
SYMBOL(boolalpha, std::, <iostream>)
SYMBOL(boyer_moore_horspool_searcher, std::, <functional>)
SYMBOL(boyer_moore_searcher, std::, <functional>)
+SYMBOL(breakpoint, std::, <debugging>)
+SYMBOL(breakpoint_if_debugging, std::, <debugging>)
SYMBOL(bsearch, std::, <cstdlib>)
SYMBOL(bsearch, None, <cstdlib>)
SYMBOL(bsearch, None, <stdlib.h>)
@@ -951,6 +960,7 @@ SYMBOL(copy_constructible, std::, <concepts>)
SYMBOL(copy_if, std::, <algorithm>)
SYMBOL(copy_n, std::, <algorithm>)
SYMBOL(copyable, std::, <concepts>)
+SYMBOL(copyable_function, std::, <functional>)
SYMBOL(copysign, std::, <cmath>)
SYMBOL(copysign, None, <cmath>)
SYMBOL(copysign, None, <math.h>)
@@ -1048,12 +1058,14 @@ SYMBOL(dextents, std::, <mdspan>)
SYMBOL(difftime, std::, <ctime>)
SYMBOL(difftime, None, <ctime>)
SYMBOL(difftime, None, <time.h>)
+SYMBOL(dims, std::, <mdspan>)
SYMBOL(disable_sized_sentinel_for, std::, <iterator>)
SYMBOL(discard_block_engine, std::, <random>)
SYMBOL(discrete_distribution, std::, <random>)
SYMBOL(disjunction, std::, <type_traits>)
SYMBOL(disjunction_v, std::, <type_traits>)
SYMBOL(distance, std::, <iterator>)
+SYMBOL(div_sat, std::, <numeric>)
SYMBOL(div_t, std::, <cstdlib>)
SYMBOL(div_t, None, <cstdlib>)
SYMBOL(div_t, None, <stdlib.h>)
@@ -1077,6 +1089,7 @@ SYMBOL(emit_on_flush, std::, <ostream>)
SYMBOL(emit_on_flush, std::, <iostream>)
SYMBOL(enable_if, std::, <type_traits>)
SYMBOL(enable_if_t, std::, <type_traits>)
+SYMBOL(enable_nonlocking_formatter_optimization, std::, <format>)
SYMBOL(enable_shared_from_this, std::, <memory>)
SYMBOL(endian, std::, <bit>)
SYMBOL(endl, std::, <ostream>)
@@ -1241,8 +1254,7 @@ 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::, <fstream>)
SYMBOL(filebuf, std::, <iosfwd>)
SYMBOL(fill, std::, <algorithm>)
SYMBOL(fill_n, std::, <algorithm>)
@@ -1322,11 +1334,13 @@ SYMBOL(format, std::, <format>)
SYMBOL(format_args, std::, <format>)
SYMBOL(format_context, std::, <format>)
SYMBOL(format_error, std::, <format>)
+SYMBOL(format_kind, 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>)
+SYMBOL(formattable, std::, <format>)
SYMBOL(formatted_size, std::, <format>)
SYMBOL(formatter, std::, <format>)
SYMBOL(forward, std::, <utility>)
@@ -1398,6 +1412,7 @@ SYMBOL(ftell, std::, <cstdio>)
SYMBOL(ftell, None, <cstdio>)
SYMBOL(ftell, None, <stdio.h>)
SYMBOL(function, std::, <functional>)
+SYMBOL(function_ref, std::, <functional>)
SYMBOL(future, std::, <future>)
SYMBOL(future_category, std::, <future>)
SYMBOL(future_errc, std::, <future>)
@@ -1488,7 +1503,6 @@ SYMBOL(hypotl, None, <math.h>)
SYMBOL(identity, std::, <functional>)
SYMBOL(ifstream, std::, <fstream>)
SYMBOL(ifstream, std::, <iosfwd>)
-SYMBOL(ignore, std::, <tuple>)
SYMBOL(ilogb, std::, <cmath>)
SYMBOL(ilogb, None, <cmath>)
SYMBOL(ilogb, None, <math.h>)
@@ -1544,6 +1558,7 @@ SYMBOL(inner_product, std::, <numeric>)
SYMBOL(inout_ptr, std::, <memory>)
SYMBOL(inout_ptr_t, std::, <memory>)
SYMBOL(inplace_merge, std::, <algorithm>)
+SYMBOL(inplace_vector, std::, <inplace_vector>)
SYMBOL(input_iterator, std::, <iterator>)
SYMBOL(input_iterator_tag, std::, <iterator>)
SYMBOL(input_or_output_iterator, std::, <iterator>)
@@ -1649,6 +1664,7 @@ SYMBOL(is_copy_assignable_v, std::, <type_traits>)
SYMBOL(is_copy_constructible, std::, <type_traits>)
SYMBOL(is_copy_constructible_v, std::, <type_traits>)
SYMBOL(is_corresponding_member, std::, <type_traits>)
+SYMBOL(is_debugger_present, std::, <debugging>)
SYMBOL(is_default_constructible, std::, <type_traits>)
SYMBOL(is_default_constructible_v, std::, <type_traits>)
SYMBOL(is_destructible, std::, <type_traits>)
@@ -1790,6 +1806,8 @@ SYMBOL(is_union, std::, <type_traits>)
SYMBOL(is_union_v, std::, <type_traits>)
SYMBOL(is_unsigned, std::, <type_traits>)
SYMBOL(is_unsigned_v, std::, <type_traits>)
+SYMBOL(is_virtual_base_of, std::, <type_traits>)
+SYMBOL(is_virtual_base_of_v, std::, <type_traits>)
SYMBOL(is_void, std::, <type_traits>)
SYMBOL(is_void_v, std::, <type_traits>)
SYMBOL(is_volatile, std::, <type_traits>)
@@ -1938,7 +1956,9 @@ SYMBOL(latch, std::, <latch>)
SYMBOL(launch, std::, <future>)
SYMBOL(launder, std::, <new>)
SYMBOL(layout_left, std::, <mdspan>)
+SYMBOL(layout_left_padded, std::, <mdspan>)
SYMBOL(layout_right, std::, <mdspan>)
+SYMBOL(layout_right_padded, std::, <mdspan>)
SYMBOL(layout_stride, std::, <mdspan>)
SYMBOL(lcm, std::, <numeric>)
SYMBOL(lconv, std::, <clocale>)
@@ -2222,6 +2242,7 @@ 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>)
@@ -2229,6 +2250,7 @@ SYMBOL(move_only_function, std::, <functional>)
SYMBOL(move_sentinel, std::, <iterator>)
SYMBOL(mt19937, std::, <random>)
SYMBOL(mt19937_64, std::, <random>)
+SYMBOL(mul_sat, std::, <numeric>)
SYMBOL(multimap, std::, <map>)
SYMBOL(multiplies, std::, <functional>)
SYMBOL(multiset, std::, <set>)
@@ -2283,6 +2305,8 @@ SYMBOL(noboolalpha, std::, <iostream>)
SYMBOL(noemit_on_flush, std::, <ostream>)
SYMBOL(noemit_on_flush, std::, <iostream>)
SYMBOL(none_of, std::, <algorithm>)
+SYMBOL(nontype, std::, <utility>)
+SYMBOL(nontype_t, std::, <utility>)
SYMBOL(noop_coroutine, std::, <coroutine>)
SYMBOL(noop_coroutine_handle, std::, <coroutine>)
SYMBOL(noop_coroutine_promise, std::, <coroutine>)
@@ -2442,6 +2466,8 @@ SYMBOL(random_access_iterator_tag, std::, <iterator>)
SYMBOL(random_device, std::, <random>)
SYMBOL(random_shuffle, std::, <algorithm>)
SYMBOL(range_error, std::, <stdexcept>)
+SYMBOL(range_format, std::, <format>)
+SYMBOL(range_formatter, std::, <format>)
SYMBOL(rank, std::, <type_traits>)
SYMBOL(rank_v, std::, <type_traits>)
SYMBOL(ranlux24, std::, <random>)
@@ -2486,6 +2512,7 @@ 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>)
@@ -2580,8 +2607,10 @@ SYMBOL(roundl, std::, <cmath>)
SYMBOL(roundl, None, <cmath>)
SYMBOL(roundl, None, <math.h>)
SYMBOL(runtime_error, std::, <stdexcept>)
+SYMBOL(runtime_format, std::, <format>)
SYMBOL(same_as, std::, <concepts>)
SYMBOL(sample, std::, <algorithm>)
+SYMBOL(saturate_cast, std::, <numeric>)
SYMBOL(scalbln, std::, <cmath>)
SYMBOL(scalbln, None, <cmath>)
SYMBOL(scalbln, None, <math.h>)
@@ -2786,6 +2815,7 @@ SYMBOL(strftime, None, <ctime>)
SYMBOL(strftime, None, <time.h>)
SYMBOL(strict, std::, <memory>)
SYMBOL(strict_weak_order, std::, <concepts>)
+SYMBOL(strided_slice, std::, <mdspan>)
SYMBOL(string, std::, <string>)
SYMBOL(string_view, std::, <string_view>)
SYMBOL(stringbuf, std::, <sstream>)
@@ -2857,6 +2887,8 @@ SYMBOL(strxfrm, None, <cstring>)
SYMBOL(strxfrm, None, <string.h>)
SYMBOL(student_t_distribution, std::, <random>)
SYMBOL(sub_match, std::, <regex>)
+SYMBOL(sub_sat, std::, <numeric>)
+SYMBOL(submdspan_mapping_result, std::, <mdspan>)
SYMBOL(subtract_with_carry_engine, std::, <random>)
SYMBOL(suspend_always, std::, <coroutine>)
SYMBOL(suspend_never, std::, <coroutine>)
@@ -2897,6 +2929,7 @@ SYMBOL(tanl, None, <math.h>)
SYMBOL(tera, std::, <ratio>)
SYMBOL(terminate, std::, <exception>)
SYMBOL(terminate_handler, std::, <exception>)
+SYMBOL(text_encoding, std::, <text_encoding>)
SYMBOL(tgamma, std::, <cmath>)
SYMBOL(tgamma, None, <cmath>)
SYMBOL(tgamma, None, <math.h>)
@@ -3127,7 +3160,9 @@ SYMBOL(visit, std::, <variant>)
SYMBOL(visit_format_arg, std::, <format>)
SYMBOL(void_t, std::, <type_traits>)
SYMBOL(vprint_nonunicode, std::, <print>)
+SYMBOL(vprint_nonunicode_buffered, std::, <print>)
SYMBOL(vprint_unicode, std::, <print>)
+SYMBOL(vprint_unicode_buffered, std::, <print>)
SYMBOL(vprintf, std::, <cstdio>)
SYMBOL(vprintf, None, <cstdio>)
SYMBOL(vprintf, None, <stdio.h>)
@@ -3156,6 +3191,7 @@ SYMBOL(vwscanf, std::, <cwchar>)
SYMBOL(vwscanf, None, <cwchar>)
SYMBOL(vwscanf, None, <wchar.h>)
SYMBOL(wbuffer_convert, std::, <locale>)
+SYMBOL(wbuffer_convert, std::, <locale>)
SYMBOL(wcerr, std::, <iostream>)
SYMBOL(wcin, std::, <iostream>)
SYMBOL(wclog, std::, <iostream>)
@@ -3274,8 +3310,7 @@ 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::, <fstream>)
SYMBOL(wfilebuf, std::, <iosfwd>)
SYMBOL(wformat_args, std::, <format>)
SYMBOL(wformat_context, std::, <format>)
@@ -3348,6 +3383,7 @@ SYMBOL(wstreampos, std::, <iosfwd>)
SYMBOL(wstreampos, std::, <iosfwd>)
SYMBOL(wstring, std::, <string>)
SYMBOL(wstring_convert, std::, <locale>)
+SYMBOL(wstring_convert, std::, <locale>)
SYMBOL(wstring_view, std::, <string_view>)
SYMBOL(wstringbuf, std::, <sstream>)
SYMBOL(wstringbuf, std::, <iosfwd>)
@@ -3423,6 +3459,7 @@ 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>)
@@ -3605,6 +3642,7 @@ SYMBOL(chunk_view, std::ranges::, <ranges>)
SYMBOL(clamp, std::ranges::, <algorithm>)
SYMBOL(common_range, std::ranges::, <ranges>)
SYMBOL(common_view, std::ranges::, <ranges>)
+SYMBOL(concat_view, std::ranges::, <ranges>)
SYMBOL(const_iterator_t, std::ranges::, <ranges>)
SYMBOL(constant_range, std::ranges::, <ranges>)
SYMBOL(construct_at, std::ranges::, <memory>)
@@ -3629,11 +3667,13 @@ SYMBOL(disable_sized_range, std::ranges::, <ranges>)
SYMBOL(distance, std::ranges::, <iterator>)
SYMBOL(drop_view, std::ranges::, <ranges>)
SYMBOL(drop_while_view, std::ranges::, <ranges>)
+SYMBOL(elements_of, std::ranges::, <ranges>)
SYMBOL(elements_view, std::ranges::, <ranges>)
SYMBOL(empty_view, std::ranges::, <ranges>)
SYMBOL(enable_borrowed_range, std::ranges::, <ranges>)
SYMBOL(enable_view, std::ranges::, <ranges>)
SYMBOL(ends_with, std::ranges::, <algorithm>)
+SYMBOL(enumerate_view, std::ranges::, <ranges>)
SYMBOL(equal, std::ranges::, <algorithm>)
SYMBOL(equal_to, std::ranges::, <functional>)
SYMBOL(fill, std::ranges::, <algorithm>)
@@ -3833,11 +3873,13 @@ 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(concat, std::ranges::views::, <ranges>)
SYMBOL(counted, std::ranges::views::, <ranges>)
SYMBOL(drop, std::ranges::views::, <ranges>)
SYMBOL(drop_while, std::ranges::views::, <ranges>)
SYMBOL(elements, std::ranges::views::, <ranges>)
SYMBOL(empty, std::ranges::views::, <ranges>)
+SYMBOL(enumerate, std::ranges::views::, <ranges>)
SYMBOL(filter, std::ranges::views::, <ranges>)
SYMBOL(iota, std::ranges::views::, <ranges>)
SYMBOL(istream, std::ranges::views::, <ranges>)
@@ -3914,11 +3956,13 @@ SYMBOL(cartesian_product, std::views::, <ranges>)
SYMBOL(chunk, std::views::, <ranges>)
SYMBOL(chunk_by, std::views::, <ranges>)
SYMBOL(common, std::views::, <ranges>)
+SYMBOL(concat, std::views::, <ranges>)
SYMBOL(counted, std::views::, <ranges>)
SYMBOL(drop, std::views::, <ranges>)
SYMBOL(drop_while, std::views::, <ranges>)
SYMBOL(elements, std::views::, <ranges>)
SYMBOL(empty, std::views::, <ranges>)
+SYMBOL(enumerate, std::views::, <ranges>)
SYMBOL(filter, std::views::, <ranges>)
SYMBOL(iota, std::views::, <ranges>)
SYMBOL(istream, std::views::, <ranges>)
>From f597e42223a9a4494b0a08ce3188d39425ed0b6a Mon Sep 17 00:00:00 2001
From: Vadim Dudkin <vvd170501 at gmail.com>
Date: Sat, 30 Nov 2024 18:29:10 +0300
Subject: [PATCH 2/2] Add special mapping for std::ignore
---
clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index 22232a34995f2d..9179217dd6ca8b 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -261,6 +261,11 @@ SYMBOL(data, std::ranges::, <ranges>)
SYMBOL(data, std::ranges::, <iterator>)
SYMBOL(cdata, std::ranges::, <ranges>)
SYMBOL(cdata, std::ranges::, <iterator>)
+// https://eel.is/c++draft/tuple.general#2:
+// In addition to being available via inclusion of the <tuple> header,
+// ignore ... is available when <utility> ... is included.
+SYMBOL(ignore, std::, <tuple>)
+SYMBOL(ignore, std::, <utility>)
// Ignore specializations
SYMBOL(hash, std::, <functional>)
More information about the cfe-commits
mailing list