48 :
Check(myName(), tokenizer, settings, errorLogger) {}
56 void va_start_argument();
59 void wrongParameterTo_va_start_error(
const Token *tok,
const std::string& paramIsName,
const std::string& paramShouldName);
60 void referenceAs_va_start_error(
const Token *tok,
const std::string& paramName);
61 void va_end_missingError(
const Token *tok,
const std::string& varname);
62 void va_list_usedBeforeStartedError(
const Token *tok,
const std::string& varname);
63 void va_start_subsequentCallsError(
const Token *tok,
const std::string& varname);
79 return "Check for misusage of variable argument lists:\n"
80 "- Wrong parameter passed to va_start()\n"
81 "- Reference passed to va_start()\n"
82 "- Missing va_end()\n"
83 "- Using va_list before it is opened\n"
84 "- Subsequent calls to va_start/va_copy()\n";
Checking for misusage of variable argument lists.
void wrongParameterTo_va_start_error(const Token *tok, const std::string ¶mIsName, const std::string ¶mShouldName)
static std::string myName()
void va_list_usedBeforeStartedError(const Token *tok, const std::string &varname)
void referenceAs_va_start_error(const Token *tok, const std::string ¶mName)
void va_end_missingError(const Token *tok, const std::string &varname)
void runChecks(const Tokenizer &tokenizer, ErrorLogger *errorLogger) override
run checks, the token list is not simplified
void getErrorMessages(ErrorLogger *errorLogger, const Settings *settings) const override
get error messages
CheckVaarg(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
std::string classInfo() const override
get information about this class, used to generate documentation
void va_start_subsequentCallsError(const Token *tok, const std::string &varname)
Interface class that cppcheck uses to communicate with the checks.
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 token list that the TokenList generates is a linked-list of this class.
The main purpose is to tokenize the source code.
const Settings & getSettings() const