@@ -1778,9 +1778,13 @@ bool CppCheck::analyseWholeProgram()
17781778 ctu.nestedCalls .insert (ctu.nestedCalls .end (), fi2->nestedCalls .cbegin (), fi2->nestedCalls .cend ());
17791779 }
17801780 }
1781+
17811782 // cppcheck-suppress shadowFunction - TODO: fix this
17821783 for (Check *check : Check::instances ())
17831784 errors |= check->analyseWholeProgram (&ctu, mFileInfo , mSettings , *this ); // TODO: ctu
1785+
1786+ errors |= CheckUnusedFunctions::check (mSettings , *this );
1787+
17841788 return errors && (mExitCode > 0 );
17851789}
17861790
@@ -1792,7 +1796,7 @@ void CppCheck::analyseWholeProgram(const std::string &buildDir, const std::list<
17921796 return ;
17931797 }
17941798 if (mSettings .checks .isEnabled (Checks::unusedFunction))
1795- CheckUnusedFunctions::analyseWholeProgram (mSettings , this , buildDir);
1799+ CheckUnusedFunctions::analyseWholeProgram2 (mSettings , this , buildDir);
17961800 std::list<Check::FileInfo*> fileInfoList;
17971801 CTU::FileInfo ctuFileInfo;
17981802
@@ -1845,6 +1849,8 @@ void CppCheck::analyseWholeProgram(const std::string &buildDir, const std::list<
18451849 for (Check *check : Check::instances ())
18461850 check->analyseWholeProgram (&ctuFileInfo, fileInfoList, mSettings , *this );
18471851
1852+ CheckUnusedFunctions::check (mSettings , *this );
1853+
18481854 for (Check::FileInfo *fi : fileInfoList)
18491855 delete fi;
18501856}
0 commit comments