Author: ericwf Date: Tue Nov 7 12:20:58 2017 New Revision: 317610 URL: http://llvm.org/viewvc/llvm-project?rev=317610&view=rev Log: Change test suite to support c++17 dialect flag instead of c++1z.
This patch changes the test suite to attempt and prefer -std=c++17 over -std=c++1z. It also fixes the REQUIRES and UNSUPPORTED lit markers to refer to c++17 over c++1z. Modified: libcxx/trunk/docs/TestingLibcxx.rst libcxx/trunk/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp libcxx/trunk/utils/libcxx/test/config.py Modified: libcxx/trunk/docs/TestingLibcxx.rst URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/docs/TestingLibcxx.rst?rev=317610&r1=317609&r2=317610&view=diff ============================================================================== --- libcxx/trunk/docs/TestingLibcxx.rst (original) +++ libcxx/trunk/docs/TestingLibcxx.rst Tue Nov 7 12:20:58 2017 @@ -112,7 +112,7 @@ configuration. Passing the option on the .. option:: std=<standard version> - **Values**: c++98, c++03, c++11, c++14, c++1z + **Values**: c++98, c++03, c++11, c++14, c++17 Change the standard version used when building the tests. Modified: libcxx/trunk/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp?rev=317610&r1=317609&r2=317610&view=diff ============================================================================== --- libcxx/trunk/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp (original) +++ libcxx/trunk/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp Tue Nov 7 12:20:58 2017 @@ -9,7 +9,7 @@ // Usage of is_trivially_constructible is broken with these compilers. // See https://bugs.llvm.org/show_bug.cgi?id=31016 -// XFAIL: clang-3.7, apple-clang-7 && c++1z +// XFAIL: clang-3.7, apple-clang-7 && c++17 // <iterator> Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp?rev=317610&r1=317609&r2=317610&view=diff ============================================================================== --- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp (original) +++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp Tue Nov 7 12:20:58 2017 @@ -12,7 +12,7 @@ // Note that sized delete operator definitions below are simply ignored // when sized deallocation is not supported, e.g., prior to C++14. -// UNSUPPORTED: c++14, c++1z +// UNSUPPORTED: c++14, c++17 // UNSUPPORTED: sanitizer-new-delete #include <new> Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp?rev=317610&r1=317609&r2=317610&view=diff ============================================================================== --- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp (original) +++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp Tue Nov 7 12:20:58 2017 @@ -12,7 +12,7 @@ // Note that sized delete operator definitions below are simply ignored // when sized deallocation is not supported, e.g., prior to C++14. -// UNSUPPORTED: c++14, c++1z +// UNSUPPORTED: c++14, c++17 // UNSUPPORTED: sanitizer-new-delete #include <new> Modified: libcxx/trunk/utils/libcxx/test/config.py URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/config.py?rev=317610&r1=317609&r2=317610&view=diff ============================================================================== --- libcxx/trunk/utils/libcxx/test/config.py (original) +++ libcxx/trunk/utils/libcxx/test/config.py Tue Nov 7 12:20:58 2017 @@ -517,7 +517,7 @@ class Configuration(object): std = self.get_lit_conf('std') if not std: # Choose the newest possible language dialect if none is given. - possible_stds = ['c++1z', 'c++14', 'c++11', 'c++03'] + possible_stds = ['c++17', 'c++1z', 'c++14', 'c++11', 'c++03'] if self.cxx.type == 'gcc': maj_v, _, _ = self.cxx.version maj_v = int(maj_v) @@ -538,7 +538,9 @@ class Configuration(object): 'Failed to infer a supported language dialect from one of %r' % possible_stds) self.cxx.compile_flags += ['-std={0}'.format(std)] - self.config.available_features.add(std.replace('gnu++', 'c++')) + std_feature = std.replace('gnu++', 'c++') + std_feature = std.replace('1z', '17') + self.config.available_features.add(std_feature) # Configure include paths self.configure_compile_flags_header_includes() self.target_info.add_cxx_compile_flags(self.cxx.compile_flags) @@ -886,7 +888,7 @@ class Configuration(object): # Turn on warnings by default for Clang based compilers when C++ >= 11 default_enable_warnings = self.cxx.type in ['clang', 'apple-clang'] \ and len(self.config.available_features.intersection( - ['c++11', 'c++14', 'c++1z'])) != 0 + ['c++11', 'c++14', 'c++17'])) != 0 enable_warnings = self.get_lit_bool('enable_warnings', default_enable_warnings) self.cxx.useWarnings(enable_warnings) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits