diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 298697506fe1..e7f9709a33df 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -5334,7 +5334,7 @@ static const Scope* getLoopScope(const Token* tok) // static void valueFlowConditionExpressions(const TokenList &tokenlist, const SymbolDatabase& symboldatabase, ErrorLogger *errorLogger, const Settings &settings) { - if (settings.checkLevel == Settings::CheckLevel::normal) + if (!settings.daca && (settings.checkLevel == Settings::CheckLevel::normal)) return; for (const Scope * scope : symboldatabase.functionScopes) { @@ -5344,6 +5344,9 @@ static void valueFlowConditionExpressions(const TokenList &tokenlist, const Symb continue; } + if (settings.daca && (settings.checkLevel == Settings::CheckLevel::normal)) + continue; + for (Token* tok = const_cast(scope->bodyStart); tok != scope->bodyEnd; tok = tok->next()) { if (!Token::simpleMatch(tok, "if (")) continue;