parent
1ad70bbeb8
commit
0352a5d32f
|
@ -1368,7 +1368,7 @@ void CheckOther::checkConstVariable()
|
|||
if (Function::returnsReference(function)) {
|
||||
std::vector<const Token*> returns = Function::findReturns(function);
|
||||
if (std::any_of(returns.begin(), returns.end(), [&](const Token* retTok) {
|
||||
if (retTok->varId() == var->declarationId())
|
||||
if (retTok->varId() == var->declarationId())
|
||||
return true;
|
||||
while (retTok && retTok->isCast())
|
||||
retTok = retTok->astOperand2();
|
||||
|
|
Loading…
Reference in New Issue