ForwardAnalyzer: Fix crash in cast '(T* &&)', the && does not have operands

This commit is contained in:
Daniel Marjamäki 2020-03-08 11:49:14 +01:00
parent 5ea01c5d60
commit 2600dee36c
1 changed files with 5 additions and 0 deletions

View File

@ -232,6 +232,11 @@ struct ForwardTraversal {
for (Token* tok = start; tok && tok != end; tok = tok->next()) { for (Token* tok = start; tok && tok != end; tok = tok->next()) {
Token* next = nullptr; Token* next = nullptr;
if (tok->str() == "(" && tok->isCast()) {
tok = tok->link();
continue;
}
// Evaluate RHS of assignment before LHS // Evaluate RHS of assignment before LHS
if (Token* assignTok = assignExpr(tok)) { if (Token* assignTok = assignExpr(tok)) {
if (updateRecursive(assignTok->astOperand2()) == Progress::Break) if (updateRecursive(assignTok->astOperand2()) == Progress::Break)