[libc++] Turn on warnings in the test suite in C++03 for Clang-based compilers
authorLouis Dionne <ldionne@apple.com>
Fri, 1 May 2020 17:14:04 +0000 (13:14 -0400)
committerLouis Dionne <ldionne@apple.com>
Fri, 1 May 2020 17:34:11 +0000 (13:34 -0400)
libcxx/test/libcxx/selftest/newformat/pass.cpp/werror.pass.cpp
libcxx/test/libcxx/selftest/newformat/sh.cpp/werror.sh.cpp
libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
libcxx/utils/libcxx/test/config.py

index ee82c61..31b7453 100644 (file)
@@ -17,9 +17,6 @@
 // TODO: We don't enable -Werror on GCC right now, because too many tests fail.
 // UNSUPPORTED: gcc
 
-// TODO(ldionne): We don't enable -Werror in C++03 right now
-// UNSUPPORTED: c++98, c++03
-
 int main() {
     int foo;
 }
index eb115ed..5b84275 100644 (file)
@@ -14,9 +14,6 @@
 // TODO: We don't enable -Werror on GCC right now, because too many tests fail.
 // UNSUPPORTED: gcc
 
-// TODO(ldionne): We don't enable -Werror in C++03 right now
-// UNSUPPORTED: c++98, c++03
-
 // FILE_DEPENDENCIES: %t.exe
 // RUN: %{build} -Wunused-variable
 // RUN: %{run}
index 83aa36d..b63fdf4 100644 (file)
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // FILE_DEPENDENCIES: %t.exe
 // RUN: %{build} -O2
 // RUN: %{run}
index 3f718ed..93e9f8d 100644 (file)
@@ -812,10 +812,8 @@ class Configuration(object):
         self.cxx.compile_flags += ['-D_LIBCPP_DEBUG=%s' % debug_level]
 
     def configure_warnings(self):
-        # 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', 'c++2a'])) != 0
+        # Turn on warnings by default for Clang based compilers
+        default_enable_warnings = self.cxx.type in ['clang', 'apple-clang']
         enable_warnings = self.get_lit_bool('enable_warnings',
                                             default_enable_warnings)
         self.cxx.useWarnings(enable_warnings)