Merge pull request #514 from Dmitry-Me/reuseCachedValues

Reuse already known values
This commit is contained in:
PKEuS 2015-02-09 09:25:19 +01:00
commit 0a8226d4ed
1 changed files with 2 additions and 2 deletions

View File

@ -387,9 +387,9 @@ static void valueFlowString(TokenList *tokenlist)
if (Token::Match(tok, "const char %var% [ %num%| ] = %str% ;")) {
const Token *vartok = tok->tokAt(2);
const Token *strtok = tok->linkAt(3)->tokAt(2);
const Token *strtok = vartok->next()->link()->tokAt(2);
constantStrings[vartok->varId()] = strtok;
tok = tok->tokAt(3);
tok = vartok->next();
}
if (tok->varId() > 0U) {