From 7e594864032f16819ebd3a7bb27499af9fada7a1 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:53:31 +0200 Subject: [PATCH] Update symboldatabase.cpp --- lib/symboldatabase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 4eb1cecf43c..9240f2a09a6 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -735,6 +735,7 @@ void SymbolDatabase::createSymbolDatabaseFindAllScopes() else if (scope->type == Scope::eCatch) scope->checkVariable(tok->tokAt(2), AccessControl::Throw, mSettings); // check for variable declaration and add it to new scope if found tok = tok->next(); + inIfCondition = true; } else if (Token::Match(tok, "%var% {")) { endInitList.emplace(tok->linkAt(1), scope); tok = tok->next();