Skip to content

Commit

Permalink
Suppress clang-tidy warning about vararg usage in assertion macros
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
moha-gh authored and horenmar committed Apr 2, 2020
1 parent b8ce814 commit d399a30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/internal/catch_compiler_capabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit d399a30

Please sign in to comment.