Fix clang-tidy cppcoreguidelines-macro-usage warnings in headers

This commit is contained in:
Tim Wojtulewicz 2025-06-10 13:50:28 -07:00
parent 74bf987b82
commit e84c99fb14
31 changed files with 220 additions and 117 deletions

View file

@ -16,6 +16,7 @@
#include <unistd.h> // Needed to ignore __attribute__((format(printf))) on MSVC
#endif
// NOLINTBEGIN(cppcoreguidelines-macro-usage)
#define DBG_LOG(stream, ...) \
if ( ::zeek::detail::debug_logger.IsEnabled(stream) ) \
::zeek::detail::debug_logger.Log(stream, __VA_ARGS__)
@ -26,6 +27,7 @@
#define DBG_POP(stream) ::zeek::detail::debug_logger.PopIndent(stream)
#define PLUGIN_DBG_LOG(plugin, ...) ::zeek::detail::debug_logger.Log(plugin, __VA_ARGS__)
// NOLINTEND(cppcoreguidelines-macro-usage)
namespace zeek {
@ -124,9 +126,11 @@ extern DebugLogger debug_logger;
} // namespace zeek
#else
// NOLINTBEGIN(cppcoreguidelines-macro-usage)
#define DBG_LOG(...)
#define DBG_LOG_VERBOSE(...)
#define DBG_PUSH(stream)
#define DBG_POP(stream)
#define PLUGIN_DBG_LOG(plugin, ...)
// NOLINTEND(cppcoreguidelines-macro-usage)
#endif