diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 314ec2d61..768f381a4 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -6253,6 +6253,7 @@ bool Tokenizer::simplifyKnownVariablesSimplify(Token **tok2, Token *tok3, unsign if (!Token::Match(tok3->previous(), "( %var% )") && Token::Match(tok3->previous(), "&&|(|%oror% %varid% &&|%oror%|)", varid)) { tok3->str(value); + tok3->varId(valueVarId); ret = true; } @@ -6261,6 +6262,7 @@ bool Tokenizer::simplifyKnownVariablesSimplify(Token **tok2, Token *tok3, unsign // If the parameter is passed by value then simplify it if (isFunctionParameterPassedByValue(tok3)) { tok3->str(value); + tok3->varId(valueVarId); ret = true; } }