| 
    Cppcheck
    
   | 
 
Check Boost usage More...
#include <checkboost.h>
  
Public Member Functions | |
| CheckBoost () | |
| This constructor is used when registering the CheckClass.  More... | |
  Public Member Functions inherited from Check | |
| Check (const std::string &aname) | |
| This constructor is used when registering the CheckClass.  More... | |
| virtual | ~Check () | 
| Check (const Check &)=delete | |
| Check & | operator= (const Check &)=delete | 
| const std::string & | name () const | 
| class name, used to generate documentation  More... | |
| virtual FileInfo * | getFileInfo (const Tokenizer &, const Settings &) const | 
| virtual FileInfo * | loadFileInfoFromXml (const tinyxml2::XMLElement *xmlElement) const | 
| virtual bool | analyseWholeProgram (const CTU::FileInfo *ctu, const std::list< FileInfo * > &fileInfo, const Settings &, ErrorLogger &) | 
Private Member Functions | |
| CheckBoost (const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) | |
| This constructor is used when running checks.  More... | |
| void | runChecks (const Tokenizer &tokenizer, ErrorLogger *errorLogger) override | 
| Run checks against the normal token list.  More... | |
| void | checkBoostForeachModification () | 
| Check for container modification while using the BOOST_FOREACH macro  More... | |
| void | boostForeachError (const Token *tok) | 
| void | getErrorMessages (ErrorLogger *errorLogger, const Settings *settings) const override | 
| get error messages  More... | |
| std::string | classInfo () const override | 
| get information about this class, used to generate documentation  More... | |
Static Private Member Functions | |
| static std::string | myName () | 
Additional Inherited Members | |
  Static Public Member Functions inherited from Check | |
| static std::list< Check * > & | instances () | 
| List of registered check classes.  More... | |
| static void | writeToErrorList (const ErrorMessage &errmsg) | 
| Write given error to stdout in xml format.  More... | |
  Protected Member Functions inherited from Check | |
| Check (std::string aname, const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) | |
| This constructor is used when running checks.  More... | |
| void | reportError (const Token *tok, const Severity severity, const std::string &id, const std::string &msg) | 
| report an error  More... | |
| void | reportError (const Token *tok, const Severity severity, const std::string &id, const std::string &msg, const CWE &cwe, Certainty certainty) | 
| report an error  More... | |
| void | reportError (const std::list< const Token * > &callstack, Severity severity, const std::string &id, const std::string &msg) | 
| report an error  More... | |
| void | reportError (const std::list< const Token * > &callstack, Severity severity, const std::string &id, const std::string &msg, const CWE &cwe, Certainty certainty) | 
| report an error  More... | |
| void | reportError (const ErrorPath &errorPath, Severity severity, const char id[], const std::string &msg, const CWE &cwe, Certainty certainty) | 
| void | logChecker (const char id[]) | 
| log checker  More... | |
| ErrorPath | getErrorPath (const Token *errtok, const ValueFlow::Value *value, std::string bug) const | 
| bool | wrongData (const Token *tok, const char *str) | 
| Use WRONG_DATA in checkers when you check for wrong data.  More... | |
  Static Protected Member Functions inherited from Check | |
| static std::string | getMessageId (const ValueFlow::Value &value, const char id[]) | 
  Protected Attributes inherited from Check | |
| const Tokenizer *const | mTokenizer {} | 
| const Settings *const | mSettings {} | 
| ErrorLogger *const | mErrorLogger {} | 
Check Boost usage
Definition at line 40 of file checkboost.h.
      
  | 
  inline | 
This constructor is used when registering the CheckClass.
Definition at line 43 of file checkboost.h.
      
  | 
  inlineprivate | 
This constructor is used when running checks.
Definition at line 47 of file checkboost.h.
      
  | 
  private | 
Definition at line 61 of file checkboost.cpp.
References CWE664, error, normal, and Check::reportError().
Referenced by checkBoostForeachModification(), and getErrorMessages().
      
  | 
  private | 
Check for container modification while using the BOOST_FOREACH macro
Definition at line 34 of file checkboost.cpp.
References Scope::bodyEnd, Scope::bodyStart, boostForeachError(), Token::findsimplematch(), SymbolDatabase::functionScopes, Tokenizer::getSymbolDatabase(), Token::link(), Token::linkAt(), Check::logChecker(), Token::Match(), Check::mTokenizer, Token::next(), Token::simpleMatch(), Token::tokAt(), and Token::varId().
Referenced by runChecks().
      
  | 
  inlineoverrideprivatevirtual | 
get information about this class, used to generate documentation
Implements Check.
Definition at line 73 of file checkboost.h.
      
  | 
  inlineoverrideprivatevirtual | 
get error messages
Implements Check.
Definition at line 64 of file checkboost.h.
References boostForeachError().
      
  | 
  inlinestaticprivate | 
Definition at line 69 of file checkboost.h.
      
  | 
  inlineoverrideprivatevirtual | 
Run checks against the normal token list.
Implements Check.
Definition at line 51 of file checkboost.h.
References checkBoostForeachModification(), Tokenizer::getSettings(), and Tokenizer::isCPP().