Bug hunting; Fix false negatives
This commit is contained in:
parent
b4443aa5a0
commit
06aeac75dc
|
@ -1538,10 +1538,14 @@ static ExprEngine::ValuePtr executeFunctionCall(const Token *tok, Data &data)
|
|||
return retVal;
|
||||
}
|
||||
|
||||
const bool hasBody = tok->astOperand1()->function() && tok->astOperand1()->function()->hasBody();
|
||||
|
||||
std::vector<ExprEngine::ValuePtr> argValues;
|
||||
for (const Token *argtok : getArguments(tok)) {
|
||||
auto val = executeExpression1(argtok, data);
|
||||
auto val = hasBody ? executeExpression1(argtok, data) : executeExpression(argtok, data);
|
||||
argValues.push_back(val);
|
||||
if (hasBody)
|
||||
continue;
|
||||
if (!argtok->valueType() || (argtok->valueType()->constness & 1) == 1)
|
||||
continue;
|
||||
if (auto arrayValue = std::dynamic_pointer_cast<ExprEngine::ArrayValue>(val)) {
|
||||
|
|
|
@ -42,8 +42,6 @@ def get_error_lines(filename):
|
|||
linenr = 242 # warn about usage
|
||||
elif linenr == 266:
|
||||
continue # no warning should be written
|
||||
elif linenr == 295:
|
||||
continue # FIXME: False negative
|
||||
ret.append(linenr)
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Reference in New Issue