You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (const Token* tok = scope.bodyStart->next(); tok && tok != scope.bodyEnd; tok = tok->next()) {
186
-
if (Token::simpleMatch(tok, "catch (") && tok->next()->link() && tok->next()->link()->next()) { // Don't check inner catch - it is handled in another iteration of outer loop.
187
-
tok = tok->next()->link()->next()->link();
186
+
if (Token::simpleMatch(tok, "catch (") && tok->linkAt(1) && tok->linkAt(1)->next()) { // Don't check inner catch - it is handled in another iteration of outer loop.
Copy file name to clipboardExpand all lines: lib/forwardanalyzer.cpp
+4-4
Original file line number
Diff line number
Diff line change
@@ -656,13 +656,13 @@ namespace {
656
656
return Break();
657
657
}
658
658
} else if (tok->isControlFlowKeyword() && Token::Match(tok, "if|while|for (") &&
659
-
Token::simpleMatch(tok->next()->link(), ") {")) {
659
+
Token::simpleMatch(tok->linkAt(1), ") {")) {
660
660
if ((settings.vfOptions.maxForwardBranches > 0) && (++branchCount > settings.vfOptions.maxForwardBranches)) {
661
661
// TODO: should be logged on function-level instead of file-level
662
662
reportError(Severity::information, "normalCheckLevelMaxBranches", "Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.");
0 commit comments