[libcxx-commits] [libcxx] Test re-adding warnings to test suite to see why they really fail. (PR #88789)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 16 07:38:22 PDT 2024


https://github.com/EricWF updated https://github.com/llvm/llvm-project/pull/88789

>From ba163240a9a2f20fee96e7e79e4fb88698925113 Mon Sep 17 00:00:00 2001
From: Eric Fiselier <eric at efcs.ca>
Date: Mon, 15 Apr 2024 16:27:53 -0400
Subject: [PATCH 1/3] Test re-adding warnings to test suite to see why they
 really fail.

Also test some unsupported things too.
---
 libcxx/utils/libcxx/test/features.py |  3 ---
 libcxx/utils/libcxx/test/params.py   | 20 +++++---------------
 2 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 6ff16309546bae..aa0ce6ccdf5a52 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -81,9 +81,6 @@ def _getAndroidDeviceApi(cfg):
         when=_isGCC,
         actions=[
             AddCompileFlag("-D_LIBCPP_DISABLE_DEPRECATION_WARNINGS"),
-            AddCompileFlag("-Wno-placement-new"),
-            AddCompileFlag("-Wno-class-memaccess"),
-            AddFeature("GCC-ALWAYS_INLINE-FIXME"),
         ],
     ),
     Feature(
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 5e42562ed5db52..547d957eabbe81 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -23,11 +23,6 @@
     "-Wundef",
     "-Wunused-template",
     "-Wno-unused-command-line-argument",
-    "-Wno-attributes",
-    "-Wno-pessimizing-move",
-    "-Wno-noexcept-type",
-    "-Wno-aligned-allocation-unavailable",
-    "-Wno-atomic-alignment",
     "-Wno-reserved-module-identifier",
     '-Wdeprecated-copy',
     '-Wdeprecated-copy-dtor',
@@ -41,10 +36,7 @@
     # GCC warns about this when TEST_IS_CONSTANT_EVALUATED is used on a non-constexpr
     # function. (This mostly happens in C++11 mode.)
     # TODO(mordante) investigate a solution for this issue.
-    "-Wno-tautological-compare",
-    # -Wstringop-overread and -Wstringop-overflow seem to be a bit buggy currently
-    "-Wno-stringop-overread",
-    "-Wno-stringop-overflow",
+
     # These warnings should be enabled in order to support the MSVC
     # team using the test suite; They enable the warnings below and
     # expect the test suite to be clean.
@@ -59,18 +51,16 @@
     "-Wno-c++11-extensions",
 
     # TODO(philnik) This fails with the PSTL.
-    "-Wno-unknown-pragmas",
+
     # Don't fail compilation in case the compiler fails to perform the requested
     # loop vectorization.
-    "-Wno-pass-failed",
+
 
     # TODO: Find out why GCC warns in lots of places (is this a problem with always_inline?)
-    "-Wno-dangling-reference",
-    "-Wno-mismatched-new-delete",
-    "-Wno-redundant-move",
+
 
     # This doesn't make sense in real code, but we have to test it because the standard requires us to not break
-    "-Wno-self-move",
+
 ]
 
 _allStandards = ["c++03", "c++11", "c++14", "c++17", "c++20", "c++23", "c++26"]

>From ddfa6aeee362a7c586d4f4404605373ce5615438 Mon Sep 17 00:00:00 2001
From: Eric Fiselier <eric at efcs.ca>
Date: Tue, 16 Apr 2024 10:36:50 -0400
Subject: [PATCH 2/3] Add back the disabling of the attribute warning

---
 libcxx/utils/libcxx/test/params.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 547d957eabbe81..02e2fc9b1120cf 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -49,7 +49,7 @@
     # Disable warnings for extensions used in C++03
     "-Wno-local-type-template-args",
     "-Wno-c++11-extensions",
-
+    "-Wno-attributes"
     # TODO(philnik) This fails with the PSTL.
 
     # Don't fail compilation in case the compiler fails to perform the requested

>From 6552e484ce2a6cfa45d23dc85ad1036c4e0066bd Mon Sep 17 00:00:00 2001
From: Eric Fiselier <eric at efcs.ca>
Date: Tue, 16 Apr 2024 10:38:12 -0400
Subject: [PATCH 3/3] ignore attributes for now

---
 libcxx/utils/libcxx/test/params.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 02e2fc9b1120cf..834fc23c638949 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -49,7 +49,7 @@
     # Disable warnings for extensions used in C++03
     "-Wno-local-type-template-args",
     "-Wno-c++11-extensions",
-    "-Wno-attributes"
+    "-Wno-ignored-attributes",
     # TODO(philnik) This fails with the PSTL.
 
     # Don't fail compilation in case the compiler fails to perform the requested



More information about the libcxx-commits mailing list