Fix warnings in test/std/language.support
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -150,3 +150,14 @@ class CXXCompiler(object):
|
||||
cmd, out, err, rc = self.compile(os.devnull, out=os.devnull,
|
||||
flags=flags)
|
||||
return rc == 0
|
||||
|
||||
def addCompileFlagIfSupported(self, flag):
|
||||
if isinstance(flag, list):
|
||||
flags = list(flag)
|
||||
else:
|
||||
flags = [flag]
|
||||
if self.hasCompileFlag(flags):
|
||||
self.compile_flags += flags
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
@@ -570,10 +570,9 @@ class Configuration(object):
|
||||
def configure_warnings(self):
|
||||
enable_warnings = self.get_lit_bool('enable_warnings', False)
|
||||
if enable_warnings:
|
||||
self.cxx.compile_flags += ['-Wsystem-headers', '-Wall', '-Werror']
|
||||
if ('clang' in self.config.available_features or
|
||||
'apple-clang' in self.config.available_features):
|
||||
self.cxx.compile_flags += ['-Wno-user-defined-literals']
|
||||
self.cxx.compile_flags += ['-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER',
|
||||
'-Wall', '-Werror']
|
||||
self.cxx.addCompileFlagIfSupported('-Wno-user-defined-literals')
|
||||
|
||||
def configure_sanitizer(self):
|
||||
san = self.get_lit_conf('use_sanitizer', '').strip()
|
||||
|
Reference in New Issue
Block a user