fix bugprone-macro-parentheses

This commit is contained in:
Sema Checherinda 2024-08-09 15:04:03 +02:00
parent 0939e7f922
commit 96b54df163
2 changed files with 5 additions and 1 deletions

View File

@ -284,11 +284,13 @@ ASTPtr getCreateTableQueryClean(const StorageID & table_id, ContextPtr context)
SystemLogs::SystemLogs(ContextPtr global_context, const Poco::Util::AbstractConfiguration & config)
{
/// NOLINTBEGIN(bugprone-macro-parentheses)
#define CREATE_PUBLIC_MEMBERS(log_type, member, descr) \
member = createSystemLog<log_type>(global_context, "system", #member, config, #member, descr); \
LIST_OF_ALL_SYSTEM_LOGS(CREATE_PUBLIC_MEMBERS)
#undef CREATE_PUBLIC_MEMBERS
/// NOLINTEND(bugprone-macro-parentheses)
if (session_log)
global_context->addWarningMessage("Table system.session_log is enabled. It's unreliable and may contain garbage. Do not use it for any kind of security monitoring.");
@ -333,7 +335,7 @@ SystemLogs::SystemLogs(ContextPtr global_context, const Poco::Util::AbstractConf
std::vector<ISystemLog *> SystemLogs::getAllLogs() const
{
#define GET_RAW_POINTERS(log_type, member, descr) \
member.get(), \
(member).get(), \
std::vector<ISystemLog *> result = {
LIST_OF_ALL_SYSTEM_LOGS(GET_RAW_POINTERS)

View File

@ -60,11 +60,13 @@ namespace DB
};
*/
/// NOLINTBEGIN(bugprone-macro-parentheses)
#define FORWARD_DECLARATION(log_type, member, descr) \
class log_type; \
LIST_OF_ALL_SYSTEM_LOGS(FORWARD_DECLARATION)
#undef FORWARD_DECLARATION
/// NOLINTEND(bugprone-macro-parentheses)
/// System logs should be destroyed in destructor of the last Context and before tables,