Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions include/log/log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,17 @@ using cib_log_module_id_t = typename logging::module_id_t<"default">::type;

// NOLINTBEGIN(cppcoreguidelines-macro-usage)

#define CIB_DO_PRAGMA(X) _Pragma(#X)
#ifdef __clang__
#define CIB_PRAGMA(X) CIB_DO_PRAGMA(clang X)
#define CIB_PRAGMA_SEMI
#else
#define CIB_PRAGMA(X) CIB_DO_PRAGMA(GCC X)
#define CIB_PRAGMA_SEMI ;
#endif

#define CIB_LOG_MODULE(S) \
CIB_PRAGMA(diagnostic push) \
CIB_PRAGMA(diagnostic ignored "-Wshadow") \
STDX_PRAGMA(diagnostic push) \
STDX_PRAGMA(diagnostic ignored "-Wshadow") \
using cib_log_module_id_t [[maybe_unused]] = \
typename logging::module_id_t<S>::type CIB_PRAGMA_SEMI CIB_PRAGMA( \
typename logging::module_id_t<S>::type CIB_PRAGMA_SEMI STDX_PRAGMA( \
diagnostic pop)

#define CIB_LOG(FLAVOR, LEVEL, MSG, ...) \
Expand Down
Loading