Fixed #7877 (Tokenizer: Does not clear ValueFlow after first pass)

This commit is contained in:
Daniel Marjamäki 2017-02-25 17:57:39 +01:00
parent 55d7ab65b9
commit 2e91858640
1 changed files with 4 additions and 2 deletions

View File

@ -3664,9 +3664,11 @@ bool Tokenizer::simplifyTokenList2()
// clear the _functionList so it can't contain dead pointers
deleteSymbolDatabase();
// Clear AST. It will be created again at the end of this function.
for (Token *tok = list.front(); tok; tok = tok->next())
// Clear AST,ValueFlow. These will be created again at the end of this function.
for (Token *tok = list.front(); tok; tok = tok->next()) {
tok->clearAst();
tok->values.clear();
}
// f(x=g()) => x=g(); f(x)
simplifyAssignmentInFunctionCall();