@@ -249,7 +249,6 @@ CppCheck::CppCheck(ErrorLogger &errorLogger,
249249 , mSuppressInternalErrorFound(false )
250250 , mUseGlobalSuppressions(useGlobalSuppressions)
251251 , mTooManyConfigs(false )
252- , mSimplify(true )
253252 , mExecuteCommand(executeCommand)
254253{
255254}
@@ -385,7 +384,7 @@ unsigned int CppCheck::check(const std::string &path)
385384 clangimport::parseClangAstDump (&tokenizer, ast);
386385 ValueFlow::setValues (&tokenizer.list , const_cast <SymbolDatabase *>(tokenizer.getSymbolDatabase ()), this , &mSettings );
387386 if (mSettings .debugnormal )
388- tokenizer.printDebugOutput (1 );
387+ tokenizer.printDebugOutput ();
389388 checkNormalTokens (tokenizer);
390389 return mExitCode ;
391390 }
@@ -756,18 +755,8 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
756755 checkUnusedFunctions.parseTokens (mTokenizer , filename.c_str (), &mSettings );
757756
758757 // simplify more if required, skip rest of iteration if failed
759- if (mSimplify && hasRule (" simple" )) {
760- std::cout << " Handling of \" simple\" rules is deprecated and will be removed in Cppcheck 2.5." << std::endl;
761-
762- // if further simplification fails then skip rest of iteration
763- Timer timer3 (" Tokenizer::simplifyTokenList2" , mSettings .showtime , &s_timerResults);
764- result = mTokenizer .simplifyTokenList2 ();
765- timer3.stop ();
766- if (!result)
767- continue ;
768-
769- if (!Settings::terminated ())
770- executeRules (" simple" , mTokenizer );
758+ if (hasRule (" simple" )) {
759+ std::cout << " Handling of \" simple\" rules was removed in Cppcheck 2.1. Rule is executed on normal token list instead." << std::endl;
771760 }
772761
773762 } catch (const simplecpp::Output &o) {
@@ -971,6 +960,7 @@ void CppCheck::checkNormalTokens(const Tokenizer &tokenizer)
971960 }
972961
973962 executeRules (" normal" , tokenizer);
963+ executeRules (" simple" , tokenizer);
974964 }
975965}
976966
0 commit comments