Don't visit functions with multiple arguments in MonotonicityCheckMatcher

This commit is contained in:
Nikolai Kochetov 2020-11-12 13:58:14 +03:00
parent 2c637d2b37
commit bbcd10f415

View File

@ -131,8 +131,11 @@ public:
data.reject();
}
static bool needChildVisit(const ASTPtr &, const ASTPtr &)
static bool needChildVisit(const ASTPtr & parent, const ASTPtr &)
{
if (const auto * func = typeid_cast<const ASTFunction *>(parent.get()))
return func->children.size() < 2;
return true;
}
};