ForwardAnalyzer: Fixed crash

This commit is contained in:
Daniel Marjamäki 2020-03-10 10:35:49 +01:00
parent df688f7918
commit 51732e9d75
1 changed files with 6 additions and 0 deletions

View File

@ -232,10 +232,16 @@ struct ForwardTraversal {
for (Token* tok = start; tok && tok != end; tok = tok->next()) {
Token* next = nullptr;
// Skip casts..
if (tok->str() == "(" && !tok->astOperand2() && tok->isCast()) {
tok = tok->link();
continue;
}
// Skip template arguments..
if (tok->str() == "<" && tok->link()) {
tok = tok->link();
continue;
}
// Evaluate RHS of assignment before LHS
if (Token* assignTok = assignExpr(tok)) {