Skip to content

Commit b7db371

Browse files
aadanendanmar
andauthored
Update lib/checkuninitvar.cpp
apply simplification Co-authored-by: Daniel Marjamäki <daniel.marjamaki@gmail.com>
1 parent 2745f45 commit b7db371

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkuninitvar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ bool CheckUninitVarImpl::checkScopeForVariable(const Token *tok, const Variable&
834834
}
835835
}
836836
}
837-
if (parent->astParent() && parent->astParent()->isAssignmentOp() && astIsLHS(parent)) {
837+
if (Token::Match(parent->astParent(), "%assign%") && astIsLHS(parent)) {
838838
const Token *eq = parent->astParent();
839839
if (const Token *errorToken = checkExpr(eq->astOperand2(), var, *alloc, number_of_if==0)) {
840840
if (!suppressErrors)

0 commit comments

Comments
 (0)