470 changes: 235 additions & 235 deletions libcxx/test/libcxx/double_include.sh.cpp

Large diffs are not rendered by default.

728 changes: 364 additions & 364 deletions libcxx/test/libcxx/min_max_macros.compile.pass.cpp

Large diffs are not rendered by default.

456 changes: 228 additions & 228 deletions libcxx/test/libcxx/no_assert_include.compile.pass.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// <vector>

// Test that vector produces a decent diagnostic for user types that explicitly
// delete their move constructor. Such types don't meet the Cpp17CopyInsertible
// delete their move constructor. Such types don't meet the Cpp17CopyInsertable
// requirements.

#include <vector>
Expand Down
6 changes: 3 additions & 3 deletions libcxx/test/support/container_test_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
//----------------------------------------------------------------------------
/*
* Usage: The following example checks that 'unordered_map::emplace(Args&&...)'
* with 'Args = [CopyInsertable<1> const&, CopyInsertible<2>&&]'
* with 'Args = [CopyInsertable<1> const&, CopyInsertable<2>&&]'
* calls 'alloc.construct(value_type*, Args&&...)' with the same types.
*
* // Typedefs for container
* using Key = CopyInsertible<1>;
* using Value = CopyInsertible<2>;
* using Key = CopyInsertable<1>;
* using Value = CopyInsertable<2>;
* using ValueTp = std::pair<const Key, Value>;
* using Alloc = ContainerTestAllocator<ValueTp, ValueTp>;
* using Map = std::unordered_map<Key, Value, std::hash<Key>, std::equal_to<Key>, Alloc>;
Expand Down
2 changes: 1 addition & 1 deletion libcxx/utils/generate_abi_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions libcxx/utils/generate_feature_test_macro_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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)

"""
Expand Down Expand Up @@ -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():
Expand Down
9 changes: 5 additions & 4 deletions libcxx/utils/generate_header_tests.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)


Expand Down