From d399a308d04b885433396f4198c0cda999f28d77 Mon Sep 17 00:00:00 2001 From: Moritz Haase Date: Thu, 2 Apr 2020 14:22:01 +0200 Subject: [PATCH] Suppress clang-tidy warning about vararg usage in assertion macros CATCH_INTERNAL_IGNORE_BUT_WARN() introduced with b7b346c triggers clang-tidy warning 'cppcoreguidelines-pro-type-vararg' for every usage of assertion macros like CHECK() and REQUIRE(). Silence it via NOLINT in the '#if defined(__clang__)' block only, as clang-tidy honors those. --- include/internal/catch_compiler_capabilities.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h index 568e1ca0..1529f582 100644 --- a/include/internal/catch_compiler_capabilities.h +++ b/include/internal/catch_compiler_capabilities.h @@ -58,7 +58,7 @@ # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" ) -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg) */ # define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \