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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317611 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2017-11-07 20:26:23 +00:00
parent 6efb1c19a7
commit 7e73ea873f
2 changed files with 4 additions and 3 deletions

View File

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