From 9e738db435f6c37c3ce2c4757ef2be0678de7257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 29 Jul 2019 18:46:50 +0200 Subject: [PATCH] SymbolDatabase: expand usage of ValueType::matchParameter for non-pointer variables --- lib/symboldatabase.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 04f2d2665..589370b52 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -5903,15 +5903,15 @@ ValueType::MatchResult ValueType::matchParameter(const ValueType *call, const Va { if (!call || !func) return ValueType::MatchResult::UNKNOWN; - if (call->pointer == 0 || call->pointer != func->pointer) + if (call->pointer != func->pointer) return ValueType::MatchResult::UNKNOWN; // TODO if ((call->constness | func->constness) != func->constness) return ValueType::MatchResult::UNKNOWN; - if (func->sign != func->sign) + if (call->sign != func->sign) return ValueType::MatchResult::UNKNOWN; // TODO if (call->type != func->type) return ValueType::MatchResult::UNKNOWN; // TODO - if (func->type < ValueType::Type::VOID) + if (func->type < ValueType::Type::VOID || func->type == ValueType::Type::UNKNOWN_INT) return ValueType::MatchResult::UNKNOWN; return ValueType::MatchResult::SAME;