21 #ifndef checkunusedfunctionsH 
   22 #define checkunusedfunctionsH 
   30 #include <unordered_map> 
   41     friend class TestSuppressions;
 
   42     friend class TestSingleExecutorBase;
 
   43     friend class TestProcessExecutorBase;
 
   44     friend class TestThreadExecutorBase;
 
   45     friend class TestUnusedFunctions;
 
   55     std::string analyzerInfo() 
const;
 
   57     static void analyseWholeProgram(
const Settings &settings, 
ErrorLogger& errorLogger, 
const std::string &buildDir);
 
   60         unusedFunctionError(errorLogger, 
emptyString, 0, 0, 
"funcName");
 
   69     static void unusedFunctionError(
ErrorLogger& errorLogger,
 
   70                                     const std::string &filename, 
unsigned int fileIndex, 
unsigned int lineNumber,
 
   71                                     const std::string &funcname);
 
   75         unsigned int lineNumber{};
 
   76         unsigned int fileIndex{};
 
   81     std::unordered_map<std::string, FunctionUsage> 
mFunctions;
 
static const std::string FunctionDecl
 
Check for functions never called.
 
std::unordered_map< std::string, FunctionUsage > mFunctions
 
static void getErrorMessages(ErrorLogger &errorLogger)
 
CheckUnusedFunctions()=default
 
std::list< FunctionDecl > mFunctionDecl
 
std::set< std::string > mFunctionCalls
 
This is an interface, which the class responsible of error logging should implement.
 
This is just a container for general settings so that we don't need to pass individual values to func...
 
The main purpose is to tokenize the source code.
 
static const std::string emptyString