|
Cppcheck
|
#include <checkunusedfunctions.h>
Classes | |
| class | FunctionUsage |
Public Member Functions | |
| CheckUnusedFunctions () | |
| This constructor is used when registering the CheckUnusedFunctions. | |
| CheckUnusedFunctions (const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) | |
| This constructor is used when running checks. | |
| void | parseTokens (const Tokenizer &tokenizer) |
| void | check (ErrorLogger *const errorLogger) |
Private Member Functions | |
| void | getErrorMessages (ErrorLogger *errorLogger, const Settings *settings) const |
| get error messages | |
| void | unusedFunctionError (ErrorLogger *const errorLogger, const std::string &filename, unsigned int lineNumber, const std::string &funcname) |
| Dummy implementation, just to provide error for --errorlist. | |
| void | runSimplifiedChecks (const Tokenizer *, const Settings *, ErrorLogger *) |
| Dummy implementation, just to provide error for --errorlist. | |
| std::string | classInfo () const |
| get information about this class, used to generate documentation | |
Static Private Member Functions | |
| static std::string | myName () |
Private Attributes | |
| std::map< std::string, FunctionUsage > | _functions |
Definition at line 33 of file checkunusedfunctions.h.
| CheckUnusedFunctions::CheckUnusedFunctions | ( | ) | [inline] |
This constructor is used when registering the CheckUnusedFunctions.
Definition at line 36 of file checkunusedfunctions.h.
| CheckUnusedFunctions::CheckUnusedFunctions | ( | const Tokenizer * | tokenizer, |
| const Settings * | settings, | ||
| ErrorLogger * | errorLogger | ||
| ) | [inline] |
This constructor is used when running checks.
Definition at line 40 of file checkunusedfunctions.h.
| void CheckUnusedFunctions::check | ( | ErrorLogger *const | errorLogger | ) |
Definition at line 150 of file checkunusedfunctions.cpp.
References _functions, CheckUnusedFunctions::FunctionUsage::filename, CheckUnusedFunctions::FunctionUsage::lineNumber, unusedFunctionError(), CheckUnusedFunctions::FunctionUsage::usedOtherFile, and CheckUnusedFunctions::FunctionUsage::usedSameFile.
Referenced by CppCheck::checkFunctionUsage().
| std::string CheckUnusedFunctions::classInfo | ( | ) | const [inline, private, virtual] |
get information about this class, used to generate documentation
Implements Check.
Definition at line 76 of file checkunusedfunctions.h.
| void CheckUnusedFunctions::getErrorMessages | ( | ErrorLogger * | errorLogger, |
| const Settings * | settings | ||
| ) | const [inline, private, virtual] |
get error messages
Implements Check.
Definition at line 53 of file checkunusedfunctions.h.
References unusedFunctionError().
| static std::string CheckUnusedFunctions::myName | ( | ) | [inline, static, private] |
Definition at line 72 of file checkunusedfunctions.h.
| void CheckUnusedFunctions::parseTokens | ( | const Tokenizer & | tokenizer | ) |
Definition at line 34 of file checkunusedfunctions.cpp.
References _functions, CheckUnusedFunctions::FunctionUsage::filename, Tokenizer::getSourceFilePath(), Token::linenr(), CheckUnusedFunctions::FunctionUsage::lineNumber, Token::link(), Token::linkAt(), Token::Match(), Token::next(), Token::str(), Token::tokAt(), Tokenizer::tokens(), CheckUnusedFunctions::FunctionUsage::usedOtherFile, and CheckUnusedFunctions::FunctionUsage::usedSameFile.
Referenced by CppCheck::checkFile().
| void CheckUnusedFunctions::runSimplifiedChecks | ( | const Tokenizer * | , |
| const Settings * | , | ||
| ErrorLogger * | |||
| ) | [inline, private, virtual] |
Dummy implementation, just to provide error for --errorlist.
Implements Check.
Definition at line 68 of file checkunusedfunctions.h.
| void CheckUnusedFunctions::unusedFunctionError | ( | ErrorLogger *const | errorLogger, |
| const std::string & | filename, | ||
| unsigned int | lineNumber, | ||
| const std::string & | funcname | ||
| ) | [private] |
Dummy implementation, just to provide error for --errorlist.
Definition at line 180 of file checkunusedfunctions.cpp.
References ErrorLogger::ErrorMessage::FileLocation::line, ErrorLogger::reportErr(), Check::reportError(), ErrorLogger::ErrorMessage::FileLocation::setfile(), and Severity::style.
Referenced by check(), and getErrorMessages().
std::map<std::string, FunctionUsage> CheckUnusedFunctions::_functions [private] |
Definition at line 91 of file checkunusedfunctions.h.
Referenced by check(), and parseTokens().
1.7.6.1