Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorabhishekbelgaonkar232024-11-16 13:41:56 +0530
committerChris Thrasher2025-04-07 15:45:34 -0600
commitf51dc98dfcaecf402e2d3aa3e0282b27beb4e237 (patch)
treebff84c901fed9e7df60bdea68bdd71b99de106af /src/catch2
parent76f70b1403dbc0781216f49e20e45b71f7eccdd8 (diff)
downloadcatch3-f51dc98dfcaecf402e2d3aa3e0282b27beb4e237.tar.gz
Fix: Clang 19 -Wc++20-extensions warning (#2910)
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/internal/catch_compiler_capabilities.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp
index d544b00c..4cf1d652 100644
--- a/src/catch2/internal/catch_compiler_capabilities.hpp
+++ b/src/catch2/internal/catch_compiler_capabilities.hpp
@@ -103,8 +103,16 @@
# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
_Pragma( "clang diagnostic ignored \"-Wunused-variable\"" )
-# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
- _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" )
+# if (__clang_major__ >= 20)
+# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+ _Pragma( "clang diagnostic ignored \"-Wvariadic-macro-arguments-omitted\"" )
+# elif (__clang_major__ == 19)
+# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+ _Pragma( "clang diagnostic ignored \"-Wc++20-extensions\"" )
+# else
+# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS
+ _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" )
+# endif
# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
_Pragma( "clang diagnostic ignored \"-Wunused-template\"" )