[libcxx-commits] [libcxx] 2664f5d - generate_header_tests.py: Sort the header files ASCIIbetically.

Arthur O'Dwyer via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 14 06:57:32 PST 2020


Author: Arthur O'Dwyer
Date: 2020-12-14T09:56:07-05:00
New Revision: 2664f5d436522d52b0cc8c05ee76e4de8d93dad1

URL: https://github.com/llvm/llvm-project/commit/2664f5d436522d52b0cc8c05ee76e4de8d93dad1
DIFF: https://github.com/llvm/llvm-project/commit/2664f5d436522d52b0cc8c05ee76e4de8d93dad1.diff

LOG: generate_header_tests.py: Sort the header files ASCIIbetically.

Otherwise they come out in random (inode?) order.

Also `chmod +x` the generator, and re-run it. Somehow on Marek's
machine it produced \r\n line endings?! Open all files with
`newline='\n'` so that (if the Python3 docs are correct)
that won't happen again.

Differential Revision: https://reviews.llvm.org/D93137

Added: 
    

Modified: 
    libcxx/test/libcxx/double_include.sh.cpp
    libcxx/test/libcxx/min_max_macros.compile.pass.cpp
    libcxx/test/libcxx/no_assert_include.compile.pass.cpp
    libcxx/utils/generate_abi_list.py
    libcxx/utils/generate_feature_test_macro_components.py
    libcxx/utils/generate_header_tests.py

Removed: 
    


################################################################################
diff  --git a/libcxx/test/libcxx/double_include.sh.cpp b/libcxx/test/libcxx/double_include.sh.cpp
index 072b78899b36..f382ee7ab9f6 100644
--- a/libcxx/test/libcxx/double_include.sh.cpp
+++ b/libcxx/test/libcxx/double_include.sh.cpp
@@ -1,235 +1,235 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Test that we can include each header in two TU's and link them together.
-
-// RUN: %{cxx} -c %s -o %t.first.o %{flags} %{compile_flags}
-// RUN: %{cxx} -c %s -o %t.second.o -DWITH_MAIN %{flags} %{compile_flags}
-// RUN: %{cxx} -o %t.exe %t.first.o %t.second.o %{flags} %{link_flags}
-// RUN: %{run}
-
-// GCC 5 pretends it supports C++17 features, but some features like static_assert
-// without a message are not actually supported. This causes some headers to fail
-// when included.
-// UNSUPPORTED: gcc-5 && c++17
-
-// Prevent <ext/hash_map> from generating deprecated warnings for this test.
-#if defined(__DEPRECATED)
-#    undef __DEPRECATED
-#endif
-
-////////////////////////////////////////////////////////////////////////////////
-// BEGIN-GENERATED-HEADERS
-////////////////////////////////////////////////////////////////////////////////
-
-// clang-format off
-
-// WARNING: This test was generated by generate_header_tests.py
-// and should not be edited manually.
-
-// Top level headers
-#include <algorithm>
-#include <any>
-#include <array>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <atomic>
-#endif
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <barrier>
-#endif
-#include <bit>
-#include <bitset>
-#include <cassert>
-#include <ccomplex>
-#include <cctype>
-#include <cerrno>
-#include <cfenv>
-#include <cfloat>
-#include <charconv>
-#include <chrono>
-#include <cinttypes>
-#include <ciso646>
-#include <climits>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <clocale>
-#endif
-#include <cmath>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <codecvt>
-#endif
-#include <compare>
-#include <complex>
-#include <complex.h>
-#include <concepts>
-#include <condition_variable>
-#include <csetjmp>
-#include <csignal>
-#include <cstdarg>
-#include <cstdbool>
-#include <cstddef>
-#include <cstdint>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <ctgmath>
-#include <ctime>
-#include <ctype.h>
-#include <cwchar>
-#include <cwctype>
-#include <deque>
-#include <errno.h>
-#include <exception>
-#include <execution>
-#include <fenv.h>
-#include <filesystem>
-#include <float.h>
-#include <forward_list>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <fstream>
-#endif
-#include <functional>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <future>
-#endif
-#include <initializer_list>
-#include <inttypes.h>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <iomanip>
-#endif
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <ios>
-#endif
-#include <iosfwd>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <iostream>
-#endif
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <istream>
-#endif
-#include <iterator>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <latch>
-#endif
-#include <limits>
-#include <limits.h>
-#include <list>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <locale>
-#endif
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <locale.h>
-#endif
-#include <map>
-#include <math.h>
-#include <memory>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <mutex>
-#endif
-#include <new>
-#include <numbers>
-#include <numeric>
-#include <optional>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <ostream>
-#endif
-#include <queue>
-#include <random>
-#include <ratio>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <regex>
-#endif
-#include <scoped_allocator>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <semaphore>
-#endif
-#include <set>
-#include <setjmp.h>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <shared_mutex>
-#endif
-#include <span>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <sstream>
-#endif
-#include <stack>
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdexcept>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <streambuf>
-#endif
-#include <string>
-#include <string.h>
-#include <string_view>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <strstream>
-#endif
-#include <system_error>
-#include <tgmath.h>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <thread>
-#endif
-#include <tuple>
-#include <typeindex>
-#include <typeinfo>
-#include <type_traits>
-#include <unordered_map>
-#include <unordered_set>
-#include <utility>
-#include <valarray>
-#include <variant>
-#include <vector>
-#include <version>
-#include <wchar.h>
-#include <wctype.h>
-
-// experimental headers
-#if __cplusplus >= 201103L
-#    include <experimental/algorithm>
-#    if defined(__cpp_coroutines)
-#        include <experimental/coroutine>
-#    endif
-#    include <experimental/deque>
-#    include <experimental/filesystem>
-#    include <experimental/forward_list>
-#    include <experimental/functional>
-#    include <experimental/iterator>
-#    include <experimental/list>
-#    include <experimental/map>
-#    include <experimental/memory_resource>
-#    include <experimental/propagate_const>
-#    ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#        include <experimental/regex>
-#    endif
-#    include <experimental/set>
-#    include <experimental/simd>
-#    include <experimental/string>
-#    include <experimental/type_traits>
-#    include <experimental/unordered_map>
-#    include <experimental/unordered_set>
-#    include <experimental/utility>
-#    include <experimental/vector>
-#endif // __cplusplus >= 201103L
-
-// extended headers
-#include <ext/hash_map>
-#include <ext/hash_set>
-
-// clang-format on
-
-////////////////////////////////////////////////////////////////////////////////
-// END-GENERATED-HEADERS
-////////////////////////////////////////////////////////////////////////////////
-
-#if defined(WITH_MAIN)
-int main(int, char**) { return 0; }
-#endif
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// Test that we can include each header in two TU's and link them together.
+
+// RUN: %{cxx} -c %s -o %t.first.o %{flags} %{compile_flags}
+// RUN: %{cxx} -c %s -o %t.second.o -DWITH_MAIN %{flags} %{compile_flags}
+// RUN: %{cxx} -o %t.exe %t.first.o %t.second.o %{flags} %{link_flags}
+// RUN: %{run}
+
+// GCC 5 pretends it supports C++17 features, but some features like static_assert
+// without a message are not actually supported. This causes some headers to fail
+// when included.
+// UNSUPPORTED: gcc-5 && c++17
+
+// Prevent <ext/hash_map> from generating deprecated warnings for this test.
+#if defined(__DEPRECATED)
+#    undef __DEPRECATED
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// BEGIN-GENERATED-HEADERS
+////////////////////////////////////////////////////////////////////////////////
+
+// clang-format off
+
+// WARNING: This test was generated by generate_header_tests.py
+// and should not be edited manually.
+
+// Top level headers
+#include <algorithm>
+#include <any>
+#include <array>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <atomic>
+#endif
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <barrier>
+#endif
+#include <bit>
+#include <bitset>
+#include <cassert>
+#include <ccomplex>
+#include <cctype>
+#include <cerrno>
+#include <cfenv>
+#include <cfloat>
+#include <charconv>
+#include <chrono>
+#include <cinttypes>
+#include <ciso646>
+#include <climits>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <clocale>
+#endif
+#include <cmath>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <codecvt>
+#endif
+#include <compare>
+#include <complex>
+#include <complex.h>
+#include <concepts>
+#include <condition_variable>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstdbool>
+#include <cstddef>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctgmath>
+#include <ctime>
+#include <ctype.h>
+#include <cwchar>
+#include <cwctype>
+#include <deque>
+#include <errno.h>
+#include <exception>
+#include <execution>
+#include <fenv.h>
+#include <filesystem>
+#include <float.h>
+#include <forward_list>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <fstream>
+#endif
+#include <functional>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <future>
+#endif
+#include <initializer_list>
+#include <inttypes.h>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <iomanip>
+#endif
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <ios>
+#endif
+#include <iosfwd>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <iostream>
+#endif
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <istream>
+#endif
+#include <iterator>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <latch>
+#endif
+#include <limits>
+#include <limits.h>
+#include <list>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <locale>
+#endif
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <locale.h>
+#endif
+#include <map>
+#include <math.h>
+#include <memory>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <mutex>
+#endif
+#include <new>
+#include <numbers>
+#include <numeric>
+#include <optional>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <ostream>
+#endif
+#include <queue>
+#include <random>
+#include <ratio>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <regex>
+#endif
+#include <scoped_allocator>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <semaphore>
+#endif
+#include <set>
+#include <setjmp.h>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <shared_mutex>
+#endif
+#include <span>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <sstream>
+#endif
+#include <stack>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdexcept>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <streambuf>
+#endif
+#include <string>
+#include <string.h>
+#include <string_view>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <strstream>
+#endif
+#include <system_error>
+#include <tgmath.h>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <thread>
+#endif
+#include <tuple>
+#include <type_traits>
+#include <typeindex>
+#include <typeinfo>
+#include <unordered_map>
+#include <unordered_set>
+#include <utility>
+#include <valarray>
+#include <variant>
+#include <vector>
+#include <version>
+#include <wchar.h>
+#include <wctype.h>
+
+// experimental headers
+#if __cplusplus >= 201103L
+#    include <experimental/algorithm>
+#    if defined(__cpp_coroutines)
+#        include <experimental/coroutine>
+#    endif
+#    include <experimental/deque>
+#    include <experimental/filesystem>
+#    include <experimental/forward_list>
+#    include <experimental/functional>
+#    include <experimental/iterator>
+#    include <experimental/list>
+#    include <experimental/map>
+#    include <experimental/memory_resource>
+#    include <experimental/propagate_const>
+#    ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#        include <experimental/regex>
+#    endif
+#    include <experimental/set>
+#    include <experimental/simd>
+#    include <experimental/string>
+#    include <experimental/type_traits>
+#    include <experimental/unordered_map>
+#    include <experimental/unordered_set>
+#    include <experimental/utility>
+#    include <experimental/vector>
+#endif // __cplusplus >= 201103L
+
+// extended headers
+#include <ext/hash_map>
+#include <ext/hash_set>
+
+// clang-format on
+
+////////////////////////////////////////////////////////////////////////////////
+// END-GENERATED-HEADERS
+////////////////////////////////////////////////////////////////////////////////
+
+#if defined(WITH_MAIN)
+int main(int, char**) { return 0; }
+#endif

diff  --git a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
index 21f70d7a888e..953dbbea5e66 100644
--- a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
+++ b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
@@ -1,364 +1,364 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Test that headers are not tripped up by the surrounding code defining the
-// min() and max() macros.
-
-// GCC 5 has incomplete support for C++17, so some headers fail when included.
-// UNSUPPORTED: gcc-5 && c++17
-
-// Prevent <ext/hash_map> from generating deprecated warnings for this test.
-#if defined(__DEPRECATED)
-#    undef __DEPRECATED
-#endif
-
-#define TEST_MACROS() static_assert(min() == true && max() == true, "")
-#define min() true
-#define max() true
-
-////////////////////////////////////////////////////////////////////////////////
-// BEGIN-GENERATED-HEADERS
-////////////////////////////////////////////////////////////////////////////////
-
-// clang-format off
-
-// WARNING: This test was generated by generate_header_tests.py
-// and should not be edited manually.
-
-// Top level headers
-#include <algorithm>
-TEST_MACROS();
-#include <any>
-TEST_MACROS();
-#include <array>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <atomic>
-TEST_MACROS();
-#endif
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <barrier>
-TEST_MACROS();
-#endif
-#include <bit>
-TEST_MACROS();
-#include <bitset>
-TEST_MACROS();
-#include <cassert>
-TEST_MACROS();
-#include <ccomplex>
-TEST_MACROS();
-#include <cctype>
-TEST_MACROS();
-#include <cerrno>
-TEST_MACROS();
-#include <cfenv>
-TEST_MACROS();
-#include <cfloat>
-TEST_MACROS();
-#include <charconv>
-TEST_MACROS();
-#include <chrono>
-TEST_MACROS();
-#include <cinttypes>
-TEST_MACROS();
-#include <ciso646>
-TEST_MACROS();
-#include <climits>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <clocale>
-TEST_MACROS();
-#endif
-#include <cmath>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <codecvt>
-TEST_MACROS();
-#endif
-#include <compare>
-TEST_MACROS();
-#include <complex>
-TEST_MACROS();
-#include <complex.h>
-TEST_MACROS();
-#include <concepts>
-TEST_MACROS();
-#include <condition_variable>
-TEST_MACROS();
-#include <csetjmp>
-TEST_MACROS();
-#include <csignal>
-TEST_MACROS();
-#include <cstdarg>
-TEST_MACROS();
-#include <cstdbool>
-TEST_MACROS();
-#include <cstddef>
-TEST_MACROS();
-#include <cstdint>
-TEST_MACROS();
-#include <cstdio>
-TEST_MACROS();
-#include <cstdlib>
-TEST_MACROS();
-#include <cstring>
-TEST_MACROS();
-#include <ctgmath>
-TEST_MACROS();
-#include <ctime>
-TEST_MACROS();
-#include <ctype.h>
-TEST_MACROS();
-#include <cwchar>
-TEST_MACROS();
-#include <cwctype>
-TEST_MACROS();
-#include <deque>
-TEST_MACROS();
-#include <errno.h>
-TEST_MACROS();
-#include <exception>
-TEST_MACROS();
-#include <execution>
-TEST_MACROS();
-#include <fenv.h>
-TEST_MACROS();
-#include <filesystem>
-TEST_MACROS();
-#include <float.h>
-TEST_MACROS();
-#include <forward_list>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <fstream>
-TEST_MACROS();
-#endif
-#include <functional>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <future>
-TEST_MACROS();
-#endif
-#include <initializer_list>
-TEST_MACROS();
-#include <inttypes.h>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <iomanip>
-TEST_MACROS();
-#endif
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <ios>
-TEST_MACROS();
-#endif
-#include <iosfwd>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <iostream>
-TEST_MACROS();
-#endif
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <istream>
-TEST_MACROS();
-#endif
-#include <iterator>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <latch>
-TEST_MACROS();
-#endif
-#include <limits>
-TEST_MACROS();
-#include <limits.h>
-TEST_MACROS();
-#include <list>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <locale>
-TEST_MACROS();
-#endif
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <locale.h>
-TEST_MACROS();
-#endif
-#include <map>
-TEST_MACROS();
-#include <math.h>
-TEST_MACROS();
-#include <memory>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <mutex>
-TEST_MACROS();
-#endif
-#include <new>
-TEST_MACROS();
-#include <numbers>
-TEST_MACROS();
-#include <numeric>
-TEST_MACROS();
-#include <optional>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <ostream>
-TEST_MACROS();
-#endif
-#include <queue>
-TEST_MACROS();
-#include <random>
-TEST_MACROS();
-#include <ratio>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <regex>
-TEST_MACROS();
-#endif
-#include <scoped_allocator>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <semaphore>
-TEST_MACROS();
-#endif
-#include <set>
-TEST_MACROS();
-#include <setjmp.h>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <shared_mutex>
-TEST_MACROS();
-#endif
-#include <span>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <sstream>
-TEST_MACROS();
-#endif
-#include <stack>
-TEST_MACROS();
-#include <stdbool.h>
-TEST_MACROS();
-#include <stddef.h>
-TEST_MACROS();
-#include <stdexcept>
-TEST_MACROS();
-#include <stdint.h>
-TEST_MACROS();
-#include <stdio.h>
-TEST_MACROS();
-#include <stdlib.h>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <streambuf>
-TEST_MACROS();
-#endif
-#include <string>
-TEST_MACROS();
-#include <string.h>
-TEST_MACROS();
-#include <string_view>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <strstream>
-TEST_MACROS();
-#endif
-#include <system_error>
-TEST_MACROS();
-#include <tgmath.h>
-TEST_MACROS();
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <thread>
-TEST_MACROS();
-#endif
-#include <tuple>
-TEST_MACROS();
-#include <typeindex>
-TEST_MACROS();
-#include <typeinfo>
-TEST_MACROS();
-#include <type_traits>
-TEST_MACROS();
-#include <unordered_map>
-TEST_MACROS();
-#include <unordered_set>
-TEST_MACROS();
-#include <utility>
-TEST_MACROS();
-#include <valarray>
-TEST_MACROS();
-#include <variant>
-TEST_MACROS();
-#include <vector>
-TEST_MACROS();
-#include <version>
-TEST_MACROS();
-#include <wchar.h>
-TEST_MACROS();
-#include <wctype.h>
-TEST_MACROS();
-
-// experimental headers
-#if __cplusplus >= 201103L
-#    include <experimental/algorithm>
-TEST_MACROS();
-#    if defined(__cpp_coroutines)
-#        include <experimental/coroutine>
-TEST_MACROS();
-#    endif
-#    include <experimental/deque>
-TEST_MACROS();
-#    include <experimental/filesystem>
-TEST_MACROS();
-#    include <experimental/forward_list>
-TEST_MACROS();
-#    include <experimental/functional>
-TEST_MACROS();
-#    include <experimental/iterator>
-TEST_MACROS();
-#    include <experimental/list>
-TEST_MACROS();
-#    include <experimental/map>
-TEST_MACROS();
-#    include <experimental/memory_resource>
-TEST_MACROS();
-#    include <experimental/propagate_const>
-TEST_MACROS();
-#    ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#        include <experimental/regex>
-TEST_MACROS();
-#    endif
-#    include <experimental/set>
-TEST_MACROS();
-#    include <experimental/simd>
-TEST_MACROS();
-#    include <experimental/string>
-TEST_MACROS();
-#    include <experimental/type_traits>
-TEST_MACROS();
-#    include <experimental/unordered_map>
-TEST_MACROS();
-#    include <experimental/unordered_set>
-TEST_MACROS();
-#    include <experimental/utility>
-TEST_MACROS();
-#    include <experimental/vector>
-TEST_MACROS();
-#endif // __cplusplus >= 201103L
-
-// extended headers
-#include <ext/hash_map>
-TEST_MACROS();
-#include <ext/hash_set>
-TEST_MACROS();
-
-// clang-format on
-
-////////////////////////////////////////////////////////////////////////////////
-// END-GENERATED-HEADERS
-////////////////////////////////////////////////////////////////////////////////
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// Test that headers are not tripped up by the surrounding code defining the
+// min() and max() macros.
+
+// GCC 5 has incomplete support for C++17, so some headers fail when included.
+// UNSUPPORTED: gcc-5 && c++17
+
+// Prevent <ext/hash_map> from generating deprecated warnings for this test.
+#if defined(__DEPRECATED)
+#    undef __DEPRECATED
+#endif
+
+#define TEST_MACROS() static_assert(min() == true && max() == true, "")
+#define min() true
+#define max() true
+
+////////////////////////////////////////////////////////////////////////////////
+// BEGIN-GENERATED-HEADERS
+////////////////////////////////////////////////////////////////////////////////
+
+// clang-format off
+
+// WARNING: This test was generated by generate_header_tests.py
+// and should not be edited manually.
+
+// Top level headers
+#include <algorithm>
+TEST_MACROS();
+#include <any>
+TEST_MACROS();
+#include <array>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <atomic>
+TEST_MACROS();
+#endif
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <barrier>
+TEST_MACROS();
+#endif
+#include <bit>
+TEST_MACROS();
+#include <bitset>
+TEST_MACROS();
+#include <cassert>
+TEST_MACROS();
+#include <ccomplex>
+TEST_MACROS();
+#include <cctype>
+TEST_MACROS();
+#include <cerrno>
+TEST_MACROS();
+#include <cfenv>
+TEST_MACROS();
+#include <cfloat>
+TEST_MACROS();
+#include <charconv>
+TEST_MACROS();
+#include <chrono>
+TEST_MACROS();
+#include <cinttypes>
+TEST_MACROS();
+#include <ciso646>
+TEST_MACROS();
+#include <climits>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <clocale>
+TEST_MACROS();
+#endif
+#include <cmath>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <codecvt>
+TEST_MACROS();
+#endif
+#include <compare>
+TEST_MACROS();
+#include <complex>
+TEST_MACROS();
+#include <complex.h>
+TEST_MACROS();
+#include <concepts>
+TEST_MACROS();
+#include <condition_variable>
+TEST_MACROS();
+#include <csetjmp>
+TEST_MACROS();
+#include <csignal>
+TEST_MACROS();
+#include <cstdarg>
+TEST_MACROS();
+#include <cstdbool>
+TEST_MACROS();
+#include <cstddef>
+TEST_MACROS();
+#include <cstdint>
+TEST_MACROS();
+#include <cstdio>
+TEST_MACROS();
+#include <cstdlib>
+TEST_MACROS();
+#include <cstring>
+TEST_MACROS();
+#include <ctgmath>
+TEST_MACROS();
+#include <ctime>
+TEST_MACROS();
+#include <ctype.h>
+TEST_MACROS();
+#include <cwchar>
+TEST_MACROS();
+#include <cwctype>
+TEST_MACROS();
+#include <deque>
+TEST_MACROS();
+#include <errno.h>
+TEST_MACROS();
+#include <exception>
+TEST_MACROS();
+#include <execution>
+TEST_MACROS();
+#include <fenv.h>
+TEST_MACROS();
+#include <filesystem>
+TEST_MACROS();
+#include <float.h>
+TEST_MACROS();
+#include <forward_list>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <fstream>
+TEST_MACROS();
+#endif
+#include <functional>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <future>
+TEST_MACROS();
+#endif
+#include <initializer_list>
+TEST_MACROS();
+#include <inttypes.h>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <iomanip>
+TEST_MACROS();
+#endif
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <ios>
+TEST_MACROS();
+#endif
+#include <iosfwd>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <iostream>
+TEST_MACROS();
+#endif
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <istream>
+TEST_MACROS();
+#endif
+#include <iterator>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <latch>
+TEST_MACROS();
+#endif
+#include <limits>
+TEST_MACROS();
+#include <limits.h>
+TEST_MACROS();
+#include <list>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <locale>
+TEST_MACROS();
+#endif
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <locale.h>
+TEST_MACROS();
+#endif
+#include <map>
+TEST_MACROS();
+#include <math.h>
+TEST_MACROS();
+#include <memory>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <mutex>
+TEST_MACROS();
+#endif
+#include <new>
+TEST_MACROS();
+#include <numbers>
+TEST_MACROS();
+#include <numeric>
+TEST_MACROS();
+#include <optional>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <ostream>
+TEST_MACROS();
+#endif
+#include <queue>
+TEST_MACROS();
+#include <random>
+TEST_MACROS();
+#include <ratio>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <regex>
+TEST_MACROS();
+#endif
+#include <scoped_allocator>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <semaphore>
+TEST_MACROS();
+#endif
+#include <set>
+TEST_MACROS();
+#include <setjmp.h>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <shared_mutex>
+TEST_MACROS();
+#endif
+#include <span>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <sstream>
+TEST_MACROS();
+#endif
+#include <stack>
+TEST_MACROS();
+#include <stdbool.h>
+TEST_MACROS();
+#include <stddef.h>
+TEST_MACROS();
+#include <stdexcept>
+TEST_MACROS();
+#include <stdint.h>
+TEST_MACROS();
+#include <stdio.h>
+TEST_MACROS();
+#include <stdlib.h>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <streambuf>
+TEST_MACROS();
+#endif
+#include <string>
+TEST_MACROS();
+#include <string.h>
+TEST_MACROS();
+#include <string_view>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <strstream>
+TEST_MACROS();
+#endif
+#include <system_error>
+TEST_MACROS();
+#include <tgmath.h>
+TEST_MACROS();
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <thread>
+TEST_MACROS();
+#endif
+#include <tuple>
+TEST_MACROS();
+#include <type_traits>
+TEST_MACROS();
+#include <typeindex>
+TEST_MACROS();
+#include <typeinfo>
+TEST_MACROS();
+#include <unordered_map>
+TEST_MACROS();
+#include <unordered_set>
+TEST_MACROS();
+#include <utility>
+TEST_MACROS();
+#include <valarray>
+TEST_MACROS();
+#include <variant>
+TEST_MACROS();
+#include <vector>
+TEST_MACROS();
+#include <version>
+TEST_MACROS();
+#include <wchar.h>
+TEST_MACROS();
+#include <wctype.h>
+TEST_MACROS();
+
+// experimental headers
+#if __cplusplus >= 201103L
+#    include <experimental/algorithm>
+TEST_MACROS();
+#    if defined(__cpp_coroutines)
+#        include <experimental/coroutine>
+TEST_MACROS();
+#    endif
+#    include <experimental/deque>
+TEST_MACROS();
+#    include <experimental/filesystem>
+TEST_MACROS();
+#    include <experimental/forward_list>
+TEST_MACROS();
+#    include <experimental/functional>
+TEST_MACROS();
+#    include <experimental/iterator>
+TEST_MACROS();
+#    include <experimental/list>
+TEST_MACROS();
+#    include <experimental/map>
+TEST_MACROS();
+#    include <experimental/memory_resource>
+TEST_MACROS();
+#    include <experimental/propagate_const>
+TEST_MACROS();
+#    ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#        include <experimental/regex>
+TEST_MACROS();
+#    endif
+#    include <experimental/set>
+TEST_MACROS();
+#    include <experimental/simd>
+TEST_MACROS();
+#    include <experimental/string>
+TEST_MACROS();
+#    include <experimental/type_traits>
+TEST_MACROS();
+#    include <experimental/unordered_map>
+TEST_MACROS();
+#    include <experimental/unordered_set>
+TEST_MACROS();
+#    include <experimental/utility>
+TEST_MACROS();
+#    include <experimental/vector>
+TEST_MACROS();
+#endif // __cplusplus >= 201103L
+
+// extended headers
+#include <ext/hash_map>
+TEST_MACROS();
+#include <ext/hash_set>
+TEST_MACROS();
+
+// clang-format on
+
+////////////////////////////////////////////////////////////////////////////////
+// END-GENERATED-HEADERS
+////////////////////////////////////////////////////////////////////////////////

diff  --git a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
index 435cc2f9988f..e2aba50d0960 100644
--- a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
+++ b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
@@ -1,228 +1,228 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Ensure that none of the standard C++ headers implicitly include cassert or
-// assert.h (because assert() is implemented as a macro).
-
-// GCC 5 has incomplete support for C++17, so some headers fail when included.
-// UNSUPPORTED: gcc-5 && c++17
-
-// Prevent <ext/hash_map> from generating deprecated warnings for this test.
-#if defined(__DEPRECATED)
-#    undef __DEPRECATED
-#endif
-
-////////////////////////////////////////////////////////////////////////////////
-// BEGIN-GENERATED-HEADERS
-////////////////////////////////////////////////////////////////////////////////
-
-// clang-format off
-
-// WARNING: This test was generated by generate_header_tests.py
-// and should not be edited manually.
-
-// Top level headers
-#include <algorithm>
-#include <any>
-#include <array>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <atomic>
-#endif
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <barrier>
-#endif
-#include <bit>
-#include <bitset>
-#include <ccomplex>
-#include <cctype>
-#include <cerrno>
-#include <cfenv>
-#include <cfloat>
-#include <charconv>
-#include <chrono>
-#include <cinttypes>
-#include <ciso646>
-#include <climits>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <clocale>
-#endif
-#include <cmath>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <codecvt>
-#endif
-#include <compare>
-#include <complex>
-#include <complex.h>
-#include <concepts>
-#include <condition_variable>
-#include <csetjmp>
-#include <csignal>
-#include <cstdarg>
-#include <cstdbool>
-#include <cstddef>
-#include <cstdint>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <ctgmath>
-#include <ctime>
-#include <ctype.h>
-#include <cwchar>
-#include <cwctype>
-#include <deque>
-#include <errno.h>
-#include <exception>
-#include <execution>
-#include <fenv.h>
-#include <filesystem>
-#include <float.h>
-#include <forward_list>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <fstream>
-#endif
-#include <functional>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <future>
-#endif
-#include <initializer_list>
-#include <inttypes.h>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <iomanip>
-#endif
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <ios>
-#endif
-#include <iosfwd>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <iostream>
-#endif
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <istream>
-#endif
-#include <iterator>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <latch>
-#endif
-#include <limits>
-#include <limits.h>
-#include <list>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <locale>
-#endif
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <locale.h>
-#endif
-#include <map>
-#include <math.h>
-#include <memory>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <mutex>
-#endif
-#include <new>
-#include <numbers>
-#include <numeric>
-#include <optional>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <ostream>
-#endif
-#include <queue>
-#include <random>
-#include <ratio>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <regex>
-#endif
-#include <scoped_allocator>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <semaphore>
-#endif
-#include <set>
-#include <setjmp.h>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <shared_mutex>
-#endif
-#include <span>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <sstream>
-#endif
-#include <stack>
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdexcept>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <streambuf>
-#endif
-#include <string>
-#include <string.h>
-#include <string_view>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#    include <strstream>
-#endif
-#include <system_error>
-#include <tgmath.h>
-#ifndef _LIBCPP_HAS_NO_THREADS
-#    include <thread>
-#endif
-#include <tuple>
-#include <typeindex>
-#include <typeinfo>
-#include <type_traits>
-#include <unordered_map>
-#include <unordered_set>
-#include <utility>
-#include <valarray>
-#include <variant>
-#include <vector>
-#include <version>
-#include <wchar.h>
-#include <wctype.h>
-
-// experimental headers
-#if __cplusplus >= 201103L
-#    include <experimental/algorithm>
-#    if defined(__cpp_coroutines)
-#        include <experimental/coroutine>
-#    endif
-#    include <experimental/deque>
-#    include <experimental/filesystem>
-#    include <experimental/forward_list>
-#    include <experimental/functional>
-#    include <experimental/iterator>
-#    include <experimental/list>
-#    include <experimental/map>
-#    include <experimental/memory_resource>
-#    include <experimental/propagate_const>
-#    ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#        include <experimental/regex>
-#    endif
-#    include <experimental/set>
-#    include <experimental/simd>
-#    include <experimental/string>
-#    include <experimental/type_traits>
-#    include <experimental/unordered_map>
-#    include <experimental/unordered_set>
-#    include <experimental/utility>
-#    include <experimental/vector>
-#endif // __cplusplus >= 201103L
-
-// extended headers
-#include <ext/hash_map>
-#include <ext/hash_set>
-
-// clang-format on
-
-////////////////////////////////////////////////////////////////////////////////
-// END-GENERATED-HEADERS
-////////////////////////////////////////////////////////////////////////////////
-
-#ifdef assert
-#error "Do not include cassert or assert.h in standard header files"
-#endif
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// Ensure that none of the standard C++ headers implicitly include cassert or
+// assert.h (because assert() is implemented as a macro).
+
+// GCC 5 has incomplete support for C++17, so some headers fail when included.
+// UNSUPPORTED: gcc-5 && c++17
+
+// Prevent <ext/hash_map> from generating deprecated warnings for this test.
+#if defined(__DEPRECATED)
+#    undef __DEPRECATED
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// BEGIN-GENERATED-HEADERS
+////////////////////////////////////////////////////////////////////////////////
+
+// clang-format off
+
+// WARNING: This test was generated by generate_header_tests.py
+// and should not be edited manually.
+
+// Top level headers
+#include <algorithm>
+#include <any>
+#include <array>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <atomic>
+#endif
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <barrier>
+#endif
+#include <bit>
+#include <bitset>
+#include <ccomplex>
+#include <cctype>
+#include <cerrno>
+#include <cfenv>
+#include <cfloat>
+#include <charconv>
+#include <chrono>
+#include <cinttypes>
+#include <ciso646>
+#include <climits>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <clocale>
+#endif
+#include <cmath>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <codecvt>
+#endif
+#include <compare>
+#include <complex>
+#include <complex.h>
+#include <concepts>
+#include <condition_variable>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstdbool>
+#include <cstddef>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctgmath>
+#include <ctime>
+#include <ctype.h>
+#include <cwchar>
+#include <cwctype>
+#include <deque>
+#include <errno.h>
+#include <exception>
+#include <execution>
+#include <fenv.h>
+#include <filesystem>
+#include <float.h>
+#include <forward_list>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <fstream>
+#endif
+#include <functional>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <future>
+#endif
+#include <initializer_list>
+#include <inttypes.h>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <iomanip>
+#endif
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <ios>
+#endif
+#include <iosfwd>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <iostream>
+#endif
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <istream>
+#endif
+#include <iterator>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <latch>
+#endif
+#include <limits>
+#include <limits.h>
+#include <list>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <locale>
+#endif
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <locale.h>
+#endif
+#include <map>
+#include <math.h>
+#include <memory>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <mutex>
+#endif
+#include <new>
+#include <numbers>
+#include <numeric>
+#include <optional>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <ostream>
+#endif
+#include <queue>
+#include <random>
+#include <ratio>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <regex>
+#endif
+#include <scoped_allocator>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <semaphore>
+#endif
+#include <set>
+#include <setjmp.h>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <shared_mutex>
+#endif
+#include <span>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <sstream>
+#endif
+#include <stack>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdexcept>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <streambuf>
+#endif
+#include <string>
+#include <string.h>
+#include <string_view>
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#    include <strstream>
+#endif
+#include <system_error>
+#include <tgmath.h>
+#ifndef _LIBCPP_HAS_NO_THREADS
+#    include <thread>
+#endif
+#include <tuple>
+#include <type_traits>
+#include <typeindex>
+#include <typeinfo>
+#include <unordered_map>
+#include <unordered_set>
+#include <utility>
+#include <valarray>
+#include <variant>
+#include <vector>
+#include <version>
+#include <wchar.h>
+#include <wctype.h>
+
+// experimental headers
+#if __cplusplus >= 201103L
+#    include <experimental/algorithm>
+#    if defined(__cpp_coroutines)
+#        include <experimental/coroutine>
+#    endif
+#    include <experimental/deque>
+#    include <experimental/filesystem>
+#    include <experimental/forward_list>
+#    include <experimental/functional>
+#    include <experimental/iterator>
+#    include <experimental/list>
+#    include <experimental/map>
+#    include <experimental/memory_resource>
+#    include <experimental/propagate_const>
+#    ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#        include <experimental/regex>
+#    endif
+#    include <experimental/set>
+#    include <experimental/simd>
+#    include <experimental/string>
+#    include <experimental/type_traits>
+#    include <experimental/unordered_map>
+#    include <experimental/unordered_set>
+#    include <experimental/utility>
+#    include <experimental/vector>
+#endif // __cplusplus >= 201103L
+
+// extended headers
+#include <ext/hash_map>
+#include <ext/hash_set>
+
+// clang-format on
+
+////////////////////////////////////////////////////////////////////////////////
+// END-GENERATED-HEADERS
+////////////////////////////////////////////////////////////////////////////////
+
+#ifdef assert
+#error "Do not include cassert or assert.h in standard header files"
+#endif

diff  --git a/libcxx/utils/generate_abi_list.py b/libcxx/utils/generate_abi_list.py
index 018b436f4663..670300ba0f1b 100755
--- a/libcxx/utils/generate_abi_list.py
+++ b/libcxx/utils/generate_abi_list.py
@@ -18,7 +18,7 @@ def OutputFile(file):
     if isinstance(file, io.IOBase):
         return file
     assert isinstance(file, str), "Got object {} which is not a str".format(file)
-    return open(file, 'w')
+    return open(file, 'w', newline='\n')
 
 def main(argv):
     parser = argparse.ArgumentParser(

diff  --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 2364fac9f96f..5010c080c759 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -670,7 +670,7 @@ def produce_version_header():
       cxx2a_macros=produce_macros_definition_for_std('c++2a').strip())
 
   version_header_path = os.path.join(include_path, 'version')
-  with open(version_header_path, 'w') as f:
+  with open(version_header_path, 'w', newline='\n') as f:
     f.write(version_str)
 
 
@@ -816,7 +816,7 @@ def produce_tests():
            cxx2a_tests=generate_std_test(test_list, 'c++2a').strip())
     test_name = "{header}.version.pass.cpp".format(header=h)
     out_path = os.path.join(macro_test_path, test_name)
-    with open(out_path, 'w') as f:
+    with open(out_path, 'w', newline='\n') as f:
       f.write(test_body)
 
 """
@@ -903,7 +903,7 @@ def produce_docs():
 """.format(status_tables=create_table(get_status_table(), 4))
 
   table_doc_path = os.path.join(docs_path, 'FeatureTestMacroTable.rst')
-  with open(table_doc_path, 'w') as f:
+  with open(table_doc_path, 'w', newline='\n') as f:
     f.write(doc_str)
 
 def main():

diff  --git a/libcxx/utils/generate_header_tests.py b/libcxx/utils/generate_header_tests.py
old mode 100644
new mode 100755
index 961e0fb81a1d..b00f0d53be47
--- a/libcxx/utils/generate_header_tests.py
+++ b/libcxx/utils/generate_header_tests.py
@@ -137,13 +137,14 @@ def produce_include(relpath, indent_level, post_include=None):
 def produce_headers(path_parts, indent_level, post_include=None, exclusions=None):
     pattern = os.path.join(*path_parts, '[a-z]*')
 
-    include_headers = glob.glob(pattern, recursive=False)
+    files = sorted(glob.glob(pattern, recursive=False))
 
     include_headers = [
         produce_include(os.path.relpath(p, include_path),
                         indent_level, post_include=post_include)
-        for p in include_headers
-        if should_keep_header(p, exclusions)]
+        for p in files
+        if should_keep_header(p, exclusions)
+    ]
 
     return '\n'.join(include_headers)
 
@@ -169,7 +170,7 @@ def replace_generated_headers(test_path, test_str):
     content = generated_part_pattern.sub(
         preambule + test_str + postambule, content)
 
-    with open(test_path, 'w') as f:
+    with open(test_path, 'w', newline='\n') as f:
         f.write(content)
 
 


        


More information about the libcxx-commits mailing list