**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**


{
    return shard_name + '|' + replica_name;
}
std::pair<String, String> DatabaseReplicated::parseFullReplicaName(const String & name)
{
    String shard;
    String replica;
    auto pos = name.find('|');
    if (pos == std::string::npos || name.find('|', pos + 1) != std::string::npos)
        throw Exception(ErrorCodes::LOGICAL_ERROR, "Incorrect replica identifier: {}", name);
    shard = name.substr(0, pos);
    replica = name.substr(pos + 1);
    return {shard, replica};
}
ClusterPtr DatabaseReplicated::tryGetCluster() const