Skip to content

Commit

Permalink
clang-tidy: add NOLInt to macro usage and the errors in there
Browse files Browse the repository at this point in the history
  • Loading branch information
Totto16 committed May 24, 2024
1 parent 92095fc commit f871505
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/helper/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,13 @@ namespace utils {
#define UNUSED(x) (void(x)) // NOLINT(cppcoreguidelines-macro-usage)

#if !defined(NDEBUG)
#define UNREACHABLE() /* NOLINT(cppcoreguidelines-macro-usage)*/ \
do { \
std::cerr << "UNREACHABLE " << (__FILE__) << ":" << (__LINE__) << " - " << (__FUNCTION__) << "\n"; \
utils::unreachable(); \
#define UNREACHABLE() /* NOLINT(cppcoreguidelines-macro-usage)*/ \
do { /* NOLINT(cppcoreguidelines-avoid-do-while)*/ \
std::cerr << "UNREACHABLE " << (__FILE__) /* NOLINT(cppcoreguidelines-pro-bounds-array-to-pointer-decay)*/ \
<< ":" << (__LINE__) << " - " \
<< (__FUNCTION__) /* NOLINT(cppcoreguidelines-pro-bounds-array-to-pointer-decay)*/ \
<< "\n"; \
utils::unreachable(); \
} while (false)
#else
#define UNREACHABLE() utils::unreachable // NOLINT(cppcoreguidelines-macro-usage)
Expand Down

0 comments on commit f871505

Please sign in to comment.