[libcxx] r317611 - Teach test suite about C++2a dialect flag.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 7 12:26:23 PST 2017


Author: ericwf
Date: Tue Nov  7 12:26:23 2017
New Revision: 317611

URL: http://llvm.org/viewvc/llvm-project?rev=317611&view=rev
Log:
Teach test suite about C++2a dialect flag.

This patch teaches the test suite configuration about the -std=c++2a
flag. And, since it's the newest dialect, change the test suite to
choose it, if possible, by default.

Modified:
    libcxx/trunk/docs/TestingLibcxx.rst
    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=317611&r1=317610&r2=317611&view=diff
==============================================================================
--- libcxx/trunk/docs/TestingLibcxx.rst (original)
+++ libcxx/trunk/docs/TestingLibcxx.rst Tue Nov  7 12:26:23 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++17
+  **Values**: c++98, c++03, c++11, c++14, c++17, c++2a
 
   Change the standard version used when building the tests.
 

Modified: libcxx/trunk/utils/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/config.py?rev=317611&r1=317610&r2=317611&view=diff
==============================================================================
--- libcxx/trunk/utils/libcxx/test/config.py (original)
+++ libcxx/trunk/utils/libcxx/test/config.py Tue Nov  7 12:26:23 2017
@@ -517,7 +517,8 @@ 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++17', 'c++1z', 'c++14', 'c++11', 'c++03']
+            possible_stds = ['c++2a', '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)
@@ -888,7 +889,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++17'])) != 0
+                ['c++11', 'c++14', 'c++17', 'c++2a'])) != 0
         enable_warnings = self.get_lit_bool('enable_warnings',
                                             default_enable_warnings)
         self.cxx.useWarnings(enable_warnings)




More information about the cfe-commits mailing list