Skip to content

Commit a325e00

Browse files
Update checkautovariables.cpp
1 parent 5813107 commit a325e00

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/checkautovariables.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ void CheckAutoVariablesImpl::checkVarLifetimeScope(const Token * start, const To
584584
while (varTok->isCast() && varTok->valueType() && varTok->valueType()->reference != Reference::None)
585585
varTok = varTok->isBinaryOp() ? varTok->astOperand2() : varTok->astOperand1();
586586
const Variable* var = varTok->variable();
587-
if (var && !var->isGlobal() && !var->isStatic() && !var->isReference() && !var->isRValueReference() && var->valueType() && !var->valueType()->type == ValueType::UNKNOWN_TYPE &&
587+
if (var && !var->isGlobal() && !var->isStatic() && !var->isReference() && !var->isRValueReference() && var->valueType() && var->valueType()->type != ValueType::UNKNOWN_TYPE &&
588588
isInScope(var->nameToken(), tok->scope())) {
589589
errorReturnReference(tok, lt.errorPath, lt.inconclusive);
590590
break;

0 commit comments

Comments
 (0)