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;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool hasBody = tok->astOperand1()->function() && tok->astOperand1()->function()->hasBody();
|
||||||
|
|
||||||
std::vector<ExprEngine::ValuePtr> argValues;
|
std::vector<ExprEngine::ValuePtr> argValues;
|
||||||
for (const Token *argtok : getArguments(tok)) {
|
for (const Token *argtok : getArguments(tok)) {
|
||||||
auto val = executeExpression1(argtok, data);
|
auto val = hasBody ? executeExpression1(argtok, data) : executeExpression(argtok, data);
|
||||||
argValues.push_back(val);
|
argValues.push_back(val);
|
||||||
|
if (hasBody)
|
||||||
|
continue;
|
||||||
if (!argtok->valueType() || (argtok->valueType()->constness & 1) == 1)
|
if (!argtok->valueType() || (argtok->valueType()->constness & 1) == 1)
|
||||||
continue;
|
continue;
|
||||||
if (auto arrayValue = std::dynamic_pointer_cast<ExprEngine::ArrayValue>(val)) {
|
if (auto arrayValue = std::dynamic_pointer_cast<ExprEngine::ArrayValue>(val)) {
|
||||||
|
|
|
@ -42,8 +42,6 @@ def get_error_lines(filename):
|
||||||
linenr = 242 # warn about usage
|
linenr = 242 # warn about usage
|
||||||
elif linenr == 266:
|
elif linenr == 266:
|
||||||
continue # no warning should be written
|
continue # no warning should be written
|
||||||
elif linenr == 295:
|
|
||||||
continue # FIXME: False negative
|
|
||||||
ret.append(linenr)
|
ret.append(linenr)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue