**Describe the bug**
`sync` here is a pointer to a global `sync` function implicitly converted to a bool:

https://github.com/ClickHouse/ClickHouse/blob/624ccd5206a7be7c8a56f2f7590e13d57a074008/src/Databases/DatabaseReplicated.cpp#L797

**How to reproduce**
compile `master` or `v22.8.4.7-lts` with warnings enabled

**Error message and/or stacktrace**


catch (...)
                {
                }
            }
            ASTLiteral * arg1 = args[0]->as<ASTLiteral>();
            ASTLiteral * arg2 = args[1]->as<ASTLiteral>();
            if (!arg1 || !arg2 || arg1->value.getType() != Field::Types::String || arg2->value.getType() != Field::Types::String)
                return;
            String maybe_path = arg1->value.get<String>();
            String maybe_replica = arg2->value.get<String>();
            
            
            
            Macros::MacroExpansionInfo info;
            info.table_id = {getDatabaseName(), create->getTable(), create->uuid};
            info.shard = getShardName();
            info.replica = getReplicaName();
            query_context->getMacros()->expand(maybe_path, info);
            bool maybe_shard_macros = info.expanded_other;
            info.expanded_other = false;
            query_context->getMacros()->expand(maybe_replica, info);
            bool maybe_replica_macros = info.expanded_other;
            bool enable_functional_tests_helper = getContext()->getConfigRef().has("_functional_tests_helper_database_replicated_replace_args_macros");
            if (!enable_functional_tests_helper)
                LOG_WARNING(log, "It's not recommended to explicitly specify zookeeper_path and replica_name in ReplicatedMergeTree arguments");
            if (maybe_shard_macros && maybe_replica_macros)
                return;
            if (enable_functional_tests_helper && !has_expression_argument)
            {
                if (maybe_path.empty() || maybe_path.back() != '/')