Skip to content

Commit

Permalink
[libc++] Turn on warnings in the test suite in C++03 for Clang-based …
Browse files Browse the repository at this point in the history
…compilers
  • Loading branch information
ldionne committed May 1, 2020
1 parent fce82c0 commit 68fb805
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
Expand Up @@ -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;
}
3 changes: 0 additions & 3 deletions libcxx/test/libcxx/selftest/newformat/sh.cpp/werror.sh.cpp
Expand Up @@ -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}
Expand Down
Expand Up @@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//

// UNSUPPORTED: c++98, c++03

// FILE_DEPENDENCIES: %t.exe
// RUN: %{build} -O2
// RUN: %{run}
Expand Down
6 changes: 2 additions & 4 deletions libcxx/utils/libcxx/test/config.py
Expand Up @@ -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)
Expand Down

0 comments on commit 68fb805

Please sign in to comment.