Skip to content

Commit b2c06a7

Browse files
fixup! Fix #13628 FP: accessMoved with ternary
1 parent 0aec648 commit b2c06a7

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

lib/valueflow.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3296,16 +3296,11 @@ static void valueFlowAfterMove(const TokenList& tokenlist, const SymbolDatabase&
32963296
ternaryColon = ternaryColon->astParent();
32973297
if (Token::simpleMatch(ternaryColon, ":")) {
32983298
endOfFunctionCall = ternaryColon->astOperand2();
3299-
if (Token::simpleMatch(endOfFunctionCall, "(")) {
3300-
endOfFunctionCall = endOfFunctionCall->link();
3301-
} else {
3302-
Token* next = nextAfterAstRightmostLeaf(endOfFunctionCall);
3303-
if (next)
3304-
endOfFunctionCall = next;
3305-
else
3306-
endOfFunctionCall = endOfFunctionCall->next();
3307-
3308-
}
3299+
Token* next = nextAfterAstRightmostLeaf(endOfFunctionCall);
3300+
if (next)
3301+
endOfFunctionCall = next;
3302+
else
3303+
endOfFunctionCall = endOfFunctionCall->next();
33093304
}
33103305
}
33113306
ValueFlow::Value value;

0 commit comments

Comments
 (0)