Fixed order of check execution and simplification in testgarbage.cpp

This commit is contained in:
PKEuS 2014-09-30 10:37:55 +02:00
parent 14ee7dad0a
commit 926a3694a0
1 changed files with 5 additions and 1 deletions

View File

@ -73,11 +73,15 @@ private:
Tokenizer tokenizer(&settings, this);
std::istringstream istr(code);
tokenizer.tokenize(istr, filename);
tokenizer.simplifyTokenList2();
// call all "runChecks" in all registered Check classes
for (std::list<Check *>::const_iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) {
(*it)->runChecks(&tokenizer, &settings, this);
}
tokenizer.simplifyTokenList2();
// call all "runSimplifiedChecks" in all registered Check classes
for (std::list<Check *>::const_iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) {
(*it)->runSimplifiedChecks(&tokenizer, &settings, this);
}