Removed unused and obsolete functions Tokenizer::getParameterName() and Tokenizer::getNameForFunctionParams()
This commit is contained in:
parent
046712aaec
commit
4bab7f0ee2
|
@ -2457,28 +2457,6 @@ void Tokenizer::simplifyTemplates()
|
|||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
std::string Tokenizer::getNameForFunctionParams(const Token *start)
|
||||
{
|
||||
if (start->next() == start->link())
|
||||
return "";
|
||||
|
||||
std::string result;
|
||||
bool findNextComma = false;
|
||||
for (const Token *tok = start->next(); tok && tok != start->link(); tok = tok->next()) {
|
||||
if (findNextComma) {
|
||||
if (tok->str() == ",")
|
||||
findNextComma = false;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
result.append(tok->str() + ",");
|
||||
findNextComma = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static bool setVarIdParseDeclaration(const Token **tok, const std::map<std::string,unsigned int> &variableId, bool executableScope)
|
||||
{
|
||||
|
@ -7668,22 +7646,6 @@ void Tokenizer::eraseDeadCode(Token *begin, const Token *end)
|
|||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
const char *Tokenizer::getParameterName(const Token *ftok, unsigned int par)
|
||||
{
|
||||
unsigned int _par = 1;
|
||||
for (; ftok; ftok = ftok->next()) {
|
||||
if (ftok->str() == ")")
|
||||
break;
|
||||
else if (ftok->str() == ",")
|
||||
++_par;
|
||||
else if (par == _par && Token::Match(ftok, "%var% [,)]"))
|
||||
return ftok->str().c_str();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void Tokenizer::syntaxError(const Token *tok) const
|
||||
{
|
||||
reportError(tok, Severity::error, "syntaxError", "syntax error");
|
||||
|
|
|
@ -135,16 +135,6 @@ public:
|
|||
*/
|
||||
void simplifyMulAndParens();
|
||||
|
||||
/**
|
||||
* Get parameter name of function
|
||||
* @param ftok The token for the function name in a function
|
||||
* implementation/declaration
|
||||
* @param par parameter number (1,2,3,..)
|
||||
* @return if the parameter was found then the parameter name is
|
||||
* returned. Otherwise NULL is returned.
|
||||
*/
|
||||
static const char *getParameterName(const Token *ftok, unsigned int par);
|
||||
|
||||
/**
|
||||
* Calculates sizeof value for given type.
|
||||
* @param type Token which will contain e.g. "int", "*", or string.
|
||||
|
@ -648,16 +638,6 @@ public:
|
|||
*/
|
||||
void simplifyOperatorName();
|
||||
|
||||
/**
|
||||
* This will return a short name describing function parameters
|
||||
* e.g. parameters: (int a, char b) should get name "int,char,".
|
||||
* This should help to identify functions with the same name,
|
||||
* but with different parameters.
|
||||
* @param start The "(" token
|
||||
* @return, e.g. "int,char,"
|
||||
*/
|
||||
static std::string getNameForFunctionParams(const Token *start);
|
||||
|
||||
/**
|
||||
* check for duplicate enum definition
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue