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