Skip to content

[libc++] Don't skip localization-related headers in header tests #134877

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions libcxx/include/ios
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ storage-class-specifier const error_category& iostream_category() noexcept;
#else
# include <__config>

// standard-mandated includes

// [ios.syn]
# include <iosfwd>

# if _LIBCPP_HAS_LOCALIZATION

# include <__fwd/ios.h>
Expand All @@ -230,11 +235,6 @@ storage-class-specifier const error_category& iostream_category() noexcept;
# include <__verbose_abort>
# include <version>

// standard-mandated includes

// [ios.syn]
# include <iosfwd>

# if _LIBCPP_HAS_ATOMIC_HEADER
# include <__atomic/atomic.h> // for __xindex_
# endif
Expand Down
26 changes: 13 additions & 13 deletions libcxx/include/regex
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,19 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
#else
# include <__config>

// standard-mandated includes

// [iterator.range]
# include <__iterator/access.h>
# include <__iterator/data.h>
# include <__iterator/empty.h>
# include <__iterator/reverse_access.h>
# include <__iterator/size.h>

// [re.syn]
# include <compare>
# include <initializer_list>

# if _LIBCPP_HAS_LOCALIZATION

# include <__algorithm/find.h>
Expand All @@ -817,19 +830,6 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
# include <vector>
# include <version>

// standard-mandated includes

// [iterator.range]
# include <__iterator/access.h>
# include <__iterator/data.h>
# include <__iterator/empty.h>
# include <__iterator/reverse_access.h>
# include <__iterator/size.h>

// [re.syn]
# include <compare>
# include <initializer_list>

# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
Expand Down
11 changes: 5 additions & 6 deletions libcxx/include/syncstream
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ namespace std {
#else
# include <__config>

// standard-mandated includes

// [syncstream.syn]
# include <ostream>

# if _LIBCPP_HAS_LOCALIZATION

# include <__mutex/lock_guard.h>
Expand All @@ -130,17 +135,11 @@ namespace std {
# include <iosfwd> // required for declaration of default arguments
# include <streambuf>
# include <string>

# if _LIBCPP_HAS_THREADS
# include <map>
# include <shared_mutex>
# endif

// standard-mandated includes

// [syncstream.syn]
# include <ostream>

# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
Expand Down
4 changes: 1 addition & 3 deletions libcxx/modules/std.compat.cppm.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ module;
#include <cfloat>
#include <cinttypes>
#include <climits>
#if _LIBCPP_HAS_LOCALIZATION
# include <clocale>
#endif
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
Expand Down
56 changes: 14 additions & 42 deletions libcxx/modules/std.cppm.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@ module;
#include <chrono>
#include <cinttypes>
#include <climits>
#if _LIBCPP_HAS_LOCALIZATION
# include <clocale>
#endif
#include <clocale>
#include <cmath>
#if _LIBCPP_HAS_LOCALIZATION
# include <codecvt>
#endif
#include <codecvt>
#include <compare>
#include <complex>
#include <concepts>
Expand All @@ -68,32 +64,20 @@ module;
#include <flat_set>
#include <format>
#include <forward_list>
#if _LIBCPP_HAS_LOCALIZATION
# include <fstream>
#endif
#include <fstream>
#include <functional>
#include <future>
#include <initializer_list>
#if _LIBCPP_HAS_LOCALIZATION
# include <iomanip>
#endif
#if _LIBCPP_HAS_LOCALIZATION
# include <ios>
#endif
#include <iomanip>
#include <ios>
#include <iosfwd>
#if _LIBCPP_HAS_LOCALIZATION
# include <iostream>
#endif
#if _LIBCPP_HAS_LOCALIZATION
# include <istream>
#endif
#include <iostream>
#include <istream>
#include <iterator>
#include <latch>
#include <limits>
#include <list>
#if _LIBCPP_HAS_LOCALIZATION
# include <locale>
#endif
#include <locale>
#include <map>
#include <mdspan>
#include <memory>
Expand All @@ -103,40 +87,28 @@ module;
#include <numbers>
#include <numeric>
#include <optional>
#if _LIBCPP_HAS_LOCALIZATION
# include <ostream>
#endif
#include <ostream>
#include <print>
#include <queue>
#include <random>
#include <ranges>
#include <ratio>
#if _LIBCPP_HAS_LOCALIZATION
# include <regex>
#endif
#include <regex>
#include <scoped_allocator>
#include <semaphore>
#include <set>
#include <shared_mutex>
#include <source_location>
#include <span>
#if _LIBCPP_HAS_LOCALIZATION
# include <sstream>
#endif
#include <sstream>
#include <stack>
#include <stdexcept>
#include <stop_token>
#if _LIBCPP_HAS_LOCALIZATION
# include <streambuf>
#endif
#include <streambuf>
#include <string>
#include <string_view>
#if _LIBCPP_HAS_LOCALIZATION
# include <strstream>
#endif
#if _LIBCPP_HAS_LOCALIZATION
# include <syncstream>
#endif
#include <strstream>
#include <syncstream>
#include <system_error>
#include <thread>
#include <tuple>
Expand Down
31 changes: 0 additions & 31 deletions libcxx/utils/libcxx/header_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,29 +179,10 @@ def __hash__(self) -> int:
# headers with #error directives
"atomic": "_LIBCPP_HAS_ATOMIC_HEADER",
"stdatomic.h": "_LIBCPP_HAS_ATOMIC_HEADER",

# headers with #error directives
"ios": "_LIBCPP_HAS_LOCALIZATION",
# transitive includers of the above headers
"clocale": "_LIBCPP_HAS_LOCALIZATION",
"codecvt": "_LIBCPP_HAS_LOCALIZATION",
"fstream": "_LIBCPP_HAS_LOCALIZATION",
"iomanip": "_LIBCPP_HAS_LOCALIZATION",
"iostream": "_LIBCPP_HAS_LOCALIZATION",
"istream": "_LIBCPP_HAS_LOCALIZATION",
"locale": "_LIBCPP_HAS_LOCALIZATION",
"ostream": "_LIBCPP_HAS_LOCALIZATION",
"regex": "_LIBCPP_HAS_LOCALIZATION",
"sstream": "_LIBCPP_HAS_LOCALIZATION",
"streambuf": "_LIBCPP_HAS_LOCALIZATION",
"strstream": "_LIBCPP_HAS_LOCALIZATION",
"syncstream": "_LIBCPP_HAS_LOCALIZATION",
}

lit_header_restrictions = {
"barrier": "// UNSUPPORTED: no-threads, c++03, c++11, c++14, c++17",
"clocale": "// UNSUPPORTED: no-localization",
"codecvt": "// UNSUPPORTED: no-localization",
"coroutine": "// UNSUPPORTED: c++03, c++11, c++14, c++17",
"cwchar": "// UNSUPPORTED: no-wide-characters",
"cwctype": "// UNSUPPORTED: no-wide-characters",
Expand All @@ -211,26 +192,14 @@ def __hash__(self) -> int:
"experimental/type_traits": "// UNSUPPORTED: c++03",
"experimental/utility": "// UNSUPPORTED: c++03",
"filesystem": "// UNSUPPORTED: no-filesystem, c++03, c++11, c++14",
"fstream": "// UNSUPPORTED: no-localization, no-filesystem",
"future": "// UNSUPPORTED: no-threads, c++03",
"iomanip": "// UNSUPPORTED: no-localization",
"ios": "// UNSUPPORTED: no-localization",
"iostream": "// UNSUPPORTED: no-localization",
"istream": "// UNSUPPORTED: no-localization",
"latch": "// UNSUPPORTED: no-threads, c++03, c++11, c++14, c++17",
"locale": "// UNSUPPORTED: no-localization",
"mutex": "// UNSUPPORTED: no-threads, c++03",
"ostream": "// UNSUPPORTED: no-localization",
"print": "// UNSUPPORTED: no-filesystem, c++03, c++11, c++14, c++17, c++20, availability-fp_to_chars-missing", # TODO PRINT investigate
"regex": "// UNSUPPORTED: no-localization",
"semaphore": "// UNSUPPORTED: no-threads, c++03, c++11, c++14, c++17",
"shared_mutex": "// UNSUPPORTED: no-threads, c++03, c++11",
"sstream": "// UNSUPPORTED: no-localization",
"stdatomic.h": "// UNSUPPORTED: no-threads, c++03, c++11, c++14, c++17, c++20",
"stop_token": "// UNSUPPORTED: no-threads, c++03, c++11, c++14, c++17",
"streambuf": "// UNSUPPORTED: no-localization",
"strstream": "// UNSUPPORTED: no-localization",
"syncstream": "// UNSUPPORTED: no-localization",
"thread": "// UNSUPPORTED: no-threads, c++03",
"wchar.h": "// UNSUPPORTED: no-wide-characters",
"wctype.h": "// UNSUPPORTED: no-wide-characters",
Expand Down
Loading