Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Backport upstream range-header and Clang diagnostic fixes

Review Catch2 devel through 222e233903d287cda4713fb08e1a959e8d71fd6d. Add the direct cassert dependency to the range generator and preserve the upstream Clang pointer-to-bool diagnostic boundary in reusable streams. Record reviewed upstream revisions without changing compiler options, licensing, or fork-owned APIs.
Commit
1f2ec07fdfe05af6df9a573f2c16551e91eef3a6
Author
Leitwolf11 ·
Parents
bf6f0aba4b5f

Files · Download .tar.gz

Changes

 docs/upstream-status.md                              | 18 ++++++++++++++++++
 src/catch2/generators/catch_generators_range.hpp     |  1 +
 src/catch2/internal/catch_reusable_string_stream.hpp |  5 +++++
 3 files changed, 24 insertions(+)

diff --git a/docs/upstream-status.md b/docs/upstream-status.md
new file mode 100644
index 00000000..99182ad7
--- /dev/null
+++ b/docs/upstream-status.md
@@ -0,0 +1,18 @@
+# Upstream compatibility status
+
+Catch3 retains Catch2 compatibility while maintaining its own extension surface.
+Upstream fixes should be reviewed rather than blindly replacing fork-owned code.
+
+The upstream `catchorg/Catch2` `devel` branch was reviewed through
+`222e233903d287cda4713fb08e1a959e8d71fd6d` on 2026-09-29. Two changes since the
+previous reviewed revision were backported without changing upstream naming,
+licenses or compiler options:
+
+- `99ea5e97aa4d60998cfd2d9bde886de69c708ee4`: include `<cassert>` directly in
+  the range-generator header instead of relying on a transitive include.
+- `222e233903d287cda4713fb08e1a959e8d71fd6d`: isolate Clang's pointer-to-bool
+  diagnostic at the upstream reusable-string-stream compatibility boundary.
+
+These are compatibility fixes, not a claim that every future upstream change
+is automatically incorporated. The existing Windows/macOS build and test
+workflows remain the verification gate for the fork.
diff --git a/src/catch2/generators/catch_generators_range.hpp b/src/catch2/generators/catch_generators_range.hpp
index 62739b23..4d6bd1f5 100644
--- a/src/catch2/generators/catch_generators_range.hpp
+++ b/src/catch2/generators/catch_generators_range.hpp
@@ -10,6 +10,7 @@
 
 #include <catch2/generators/catch_generators.hpp>
 
+#include <cassert>
 #include <iterator>
 #include <type_traits>
 
diff --git a/src/catch2/internal/catch_reusable_string_stream.hpp b/src/catch2/internal/catch_reusable_string_stream.hpp
index 5b864f35..4fa9e5d1 100644
--- a/src/catch2/internal/catch_reusable_string_stream.hpp
+++ b/src/catch2/internal/catch_reusable_string_stream.hpp
@@ -39,6 +39,9 @@ namespace Catch {
 // be null...
 #pragma GCC diagnostic ignored "-Waddress"
 #pragma GCC diagnostic ignored "-Wnonnull-compare"
+#elif defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpointer-bool-conversion"
 #endif
 
         template<typename T>
@@ -49,6 +52,8 @@ namespace Catch {
 
 #if defined(__GNUC__) && !defined(__clang__)
 #pragma GCC diagnostic pop
+#elif defined(__clang__)
+#pragma clang diagnostic pop
 #endif
         auto get() -> std::ostream& { return *m_oss; }
     };