Fix crasher with malformed program

This commit is contained in:
Matt Pharr
2011-08-12 07:47:17 +01:00
parent 8c534d4d74
commit c74116aa24

View File

@@ -2100,7 +2100,8 @@ FunctionCallExpr::tryResolve(bool (*matchFunc)(Expr *, const Type *)) {
// It's kind of a silly to redundantly discover this for each
// potential match versus detecting this earlier in the
// matching process and just giving up.
if (!callArgs[i] || !callArgs[i]->GetType() || !candArgTypes[i])
if (!callArgs[i] || !callArgs[i]->GetType() || !candArgTypes[i] ||
dynamic_cast<const FunctionType *>(callArgs[i]->GetType()) != NULL)
return false;
// See if this caller argument matches the type of the