@@ -301,7 +301,7 @@ unsigned int CppCheck::check(const std::string &path)
301301 tokenizer.printDebugOutput (1 );
302302
303303#ifdef USE_Z3
304- if (mSettings .verification )
304+ if (mSettings .bugHunting )
305305 ExprEngine::runChecks (this , &tokenizer, &mSettings );
306306#endif
307307 return 0 ;
@@ -838,39 +838,39 @@ void CppCheck::checkRawTokens(const Tokenizer &tokenizer)
838838
839839void CppCheck::checkNormalTokens (const Tokenizer &tokenizer)
840840{
841- // call all "runChecks" in all registered Check classes
842- for (Check *check : Check::instances ()) {
843- if ( Settings::terminated ())
844- return ;
845-
846- if (Tokenizer::isMaxTime ())
847- return ;
841+ if ( mSettings . bugHunting )
842+ ExprEngine::runChecks ( this , &tokenizer, & mSettings );
843+ else {
844+ // call all "runChecks" in all registered Check classes
845+ for (Check *check : Check::instances ()) {
846+ if (Settings::terminated ())
847+ return ;
848848
849- Timer timerRunChecks (check->name () + " ::runChecks" , mSettings .showtime , &s_timerResults);
850- check->runChecks (&tokenizer, &mSettings , this );
851- }
849+ if (Tokenizer::isMaxTime ())
850+ return ;
852851
853- // Verification using ExprEngine..
854- if ( mSettings . verification )
855- ExprEngine::runChecks ( this , &tokenizer, & mSettings );
852+ Timer timerRunChecks (check-> name () + " ::runChecks " , mSettings . showtime , &s_timerResults);
853+ check-> runChecks (&tokenizer, & mSettings , this );
854+ }
856855
857- // Analyse the tokens..
856+ // Analyse the tokens..
858857
859- CTU::FileInfo *fi1 = CTU::getFileInfo (&tokenizer);
860- if (fi1) {
861- mFileInfo .push_back (fi1);
862- mAnalyzerInformation .setFileInfo (" ctu" , fi1->toString ());
863- }
858+ CTU::FileInfo *fi1 = CTU::getFileInfo (&tokenizer);
859+ if (fi1) {
860+ mFileInfo .push_back (fi1);
861+ mAnalyzerInformation .setFileInfo (" ctu" , fi1->toString ());
862+ }
864863
865- for (const Check *check : Check::instances ()) {
866- Check::FileInfo *fi = check->getFileInfo (&tokenizer, &mSettings );
867- if (fi != nullptr ) {
868- mFileInfo .push_back (fi);
869- mAnalyzerInformation .setFileInfo (check->name (), fi->toString ());
864+ for (const Check *check : Check::instances ()) {
865+ Check::FileInfo *fi = check->getFileInfo (&tokenizer, &mSettings );
866+ if (fi != nullptr ) {
867+ mFileInfo .push_back (fi);
868+ mAnalyzerInformation .setFileInfo (check->name (), fi->toString ());
869+ }
870870 }
871- }
872871
873- executeRules (" normal" , tokenizer);
872+ executeRules (" normal" , tokenizer);
873+ }
874874}
875875
876876// ---------------------------------------------------------------------------
0 commit comments