Skip to content

Commit

Permalink
Suppress clang-tidy modernize-avoid-c-arrays for TEMPLATE_TEST_CASE
Browse files Browse the repository at this point in the history
  • Loading branch information
rutayan committed Sep 23, 2022
1 parent 0de60d8 commit 547d112
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/catch2/internal/catch_template_test_registry.hpp
Expand Up @@ -84,11 +84,12 @@
struct TestName{\
TestName(){\
size_t index = 0; \
constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\
using expander = size_t[];\
constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)}; /* NOLINT(cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays) */\
using expander = size_t[]; /* NOLINT(cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays) */\
(void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
}\
};\
/* NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) */\
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
TestName<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\
return 0;\
Expand Down

0 comments on commit 547d112

Please sign in to comment.