From 2487da6f9f4f373ee9f40aa69c71878d13756db4 Mon Sep 17 00:00:00 2001 From: abhishekbelgaonkar23 <155880197+abhishekbelgaonkar23@users.noreply.github.com> Date: Sat, 16 Nov 2024 13:45:42 +0530 Subject: [PATCH] fix: Clang 19 -Wc++20-extensions warning in template test macros (#2910) - Added INTERNAL_CATCH_TEMPLATE_TEST_CASE_HANDLE_EMPTY macro for Clang 19+ - Modified template test case macro expansion path for Clang 19+ - Keeps original behavior for other compilers and older Clang versions --- src/catch2/catch_template_test_macros.hpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/catch2/catch_template_test_macros.hpp b/src/catch2/catch_template_test_macros.hpp index 2aee3be5..6762eb18 100644 --- a/src/catch2/catch_template_test_macros.hpp +++ b/src/catch2/catch_template_test_macros.hpp @@ -1,4 +1,3 @@ - // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at @@ -8,15 +7,10 @@ #ifndef CATCH_TEMPLATE_TEST_MACROS_HPP_INCLUDED #define CATCH_TEMPLATE_TEST_MACROS_HPP_INCLUDED -// We need this suppression to leak, because it took until GCC 10 -// for the front end to handle local suppression via _Pragma properly -// inside templates (so `TEMPLATE_TEST_CASE` and co). -// **THIS IS DIFFERENT FOR STANDARD TESTS, WHERE GCC 9 IS SUFFICIENT** #if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ < 10 #pragma GCC diagnostic ignored "-Wparentheses" #endif - #include #include #include