[libcxx-commits] [libcxx] 68fb805 - [libc++] Turn on warnings in the test suite in C++03 for Clang-based compilers

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 1 10:35:23 PDT 2020


Author: Louis Dionne
Date: 2020-05-01T13:34:11-04:00
New Revision: 68fb8051d086e1cf824d62c9c1093bed5e1ed9aa

URL: https://github.com/llvm/llvm-project/commit/68fb8051d086e1cf824d62c9c1093bed5e1ed9aa
DIFF: https://github.com/llvm/llvm-project/commit/68fb8051d086e1cf824d62c9c1093bed5e1ed9aa.diff

LOG: [libc++] Turn on warnings in the test suite in C++03 for Clang-based compilers

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/libcxx/test/libcxx/selftest/newformat/pass.cpp/werror.pass.cpp b/libcxx/test/libcxx/selftest/newformat/pass.cpp/werror.pass.cpp
index ee82c613153a..31b7453164ea 100644
--- a/libcxx/test/libcxx/selftest/newformat/pass.cpp/werror.pass.cpp
+++ b/libcxx/test/libcxx/selftest/newformat/pass.cpp/werror.pass.cpp
@@ -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;
 }

diff  --git a/libcxx/test/libcxx/selftest/newformat/sh.cpp/werror.sh.cpp b/libcxx/test/libcxx/selftest/newformat/sh.cpp/werror.sh.cpp
index eb115ed2fb22..5b84275bf687 100644
--- a/libcxx/test/libcxx/selftest/newformat/sh.cpp/werror.sh.cpp
+++ b/libcxx/test/libcxx/selftest/newformat/sh.cpp/werror.sh.cpp
@@ -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}

diff  --git a/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp b/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
index 83aa36dff3dd..b63fdf455f22 100644
--- a/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
+++ b/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // FILE_DEPENDENCIES: %t.exe
 // RUN: %{build} -O2
 // RUN: %{run}

diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 3f718ed50789..93e9f8d6fe94 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -812,10 +812,8 @@ def configure_debug_mode(self):
         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)


        


More information about the libcxx-commits mailing list