Fixed #4722 (Debugging enhancement: Tokenizer::simplifyTokenList() shall continue)

This commit is contained in:
Alexander Mai 2014-03-14 17:48:20 +01:00 committed by Daniel Marjamäki
parent b8a1ca29d1
commit ff5fc82704
1 changed files with 41 additions and 38 deletions

View File

@ -3631,11 +3631,13 @@ bool Tokenizer::simplifyTokenList2()
while (simplifyMathFunctions()) {}; while (simplifyMathFunctions()) {};
if (!validate()) const bool bValidate = validate();
return false; if (bValidate || // either anything is fine here...
(_settings->debug && _settings->_verbose) // or it could be dangerous to proceed, so we demand this combination of flags
) {
list.front()->assignProgressValues(); list.front()->assignProgressValues();
// Create symbol database and then remove const keywords // Create symbol database and then remove const keywords
createSymbolDatabase(); createSymbolDatabase();
for (Token *tok = list.front(); tok; tok = tok->next()) { for (Token *tok = list.front(); tok; tok = tok->next()) {
@ -3685,8 +3687,9 @@ bool Tokenizer::simplifyTokenList2()
} }
} }
} }
}
return true; return bValidate;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------