Skip to content

Commit

Permalink
SymbolDatabase: do not perform ValueFlow unless configured to do so […
Browse files Browse the repository at this point in the history
…skip ci]
  • Loading branch information
firewave committed May 1, 2024
1 parent 4385cbf commit da942ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3713,7 +3713,8 @@ bool Variable::arrayDimensions(const Settings& settings, bool& isContainer)
// check for empty array dimension []
if (dim->next()->str() != "]") {
dimension_.tok = dim->astOperand2();
ValueFlow::valueFlowConstantFoldAST(const_cast<Token *>(dimension_.tok), settings);
if (settings.vfOptions.enabled)
ValueFlow::valueFlowConstantFoldAST(const_cast<Token *>(dimension_.tok), settings);
if (dimension_.tok && dimension_.tok->hasKnownIntValue()) {
dimension_.num = dimension_.tok->getKnownIntValue();
dimension_.known = true;
Expand Down

0 comments on commit da942ae

Please sign in to comment.