Skip to content

[Tooling/Inclusion] Update std symbol mapping #118174

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 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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>)
Expand Down Expand Up @@ -389,18 +394,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>)
Expand Down
56 changes: 50 additions & 6 deletions clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand All @@ -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>)
Expand Down Expand Up @@ -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>)
Comment on lines -1244 to +1257
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previous versions of cppreference mentioned incorrect headers for filebuf and wfilebuf.
<fstream> is the correct one: https://eel.is/c++draft/fstream.syn#lib:filebuf

SYMBOL(filebuf, std::, <iosfwd>)
SYMBOL(fill, std::, <algorithm>)
SYMBOL(fill_n, std::, <algorithm>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -2222,13 +2242,15 @@ 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>)
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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand All @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down Expand Up @@ -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>)
Expand Down
Loading