Skip to content

Commit 2600dee

Browse files
committed
ForwardAnalyzer: Fix crash in cast '(T* &&)', the && does not have operands
1 parent 5ea01c5 commit 2600dee

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/forwardanalyzer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ struct ForwardTraversal {
232232
for (Token* tok = start; tok && tok != end; tok = tok->next()) {
233233
Token* next = nullptr;
234234

235+
if (tok->str() == "(" && tok->isCast()) {
236+
tok = tok->link();
237+
continue;
238+
}
239+
235240
// Evaluate RHS of assignment before LHS
236241
if (Token* assignTok = assignExpr(tok)) {
237242
if (updateRecursive(assignTok->astOperand2()) == Progress::Break)

0 commit comments

Comments
 (0)