diff options
| author | abhishekbelgaonkar23 | 2024-11-16 13:41:56 +0530 |
|---|---|---|
| committer | Chris Thrasher | 2025-04-07 15:45:34 -0600 |
| commit | f51dc98dfcaecf402e2d3aa3e0282b27beb4e237 (patch) | |
| tree | bff84c901fed9e7df60bdea68bdd71b99de106af /src | |
| parent | 76f70b1403dbc0781216f49e20e45b71f7eccdd8 (diff) | |
| download | catch3-f51dc98dfcaecf402e2d3aa3e0282b27beb4e237.tar.gz | |
Fix: Clang 19 -Wc++20-extensions warning (#2910)
Diffstat (limited to 'src')
| -rw-r--r-- | src/catch2/internal/catch_compiler_capabilities.hpp | 12 |
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\"" ) |