diff --git a/lib/forwardanalyzer.cpp b/lib/forwardanalyzer.cpp index 0289141de..f542e1796 100644 --- a/lib/forwardanalyzer.cpp +++ b/lib/forwardanalyzer.cpp @@ -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)) {