Replaced %name% with %type%
This commit is contained in:
parent
3c915b534d
commit
bf169e0c59
|
@ -366,7 +366,7 @@ void CheckClass::initializeVarList(const Function &func, std::list<std::string>
|
|||
if (level == 0 && Token::Match(ftok, "%var% (")) {
|
||||
if (ftok->strAt(2) != ")")
|
||||
initVar(ftok->str(), scope, usage);
|
||||
} else if (level == 0 && Token::Match(ftok, "%var% {") && ftok->str() != "const" && Token::Match(ftok->next()->link()->next(), ",|{|%name%")) {
|
||||
} else if (level == 0 && Token::Match(ftok, "%var% {") && ftok->str() != "const" && Token::Match(ftok->next()->link()->next(), ",|{|%type%")) {
|
||||
initVar(ftok->str(), scope, usage);
|
||||
ftok = ftok->linkAt(1);
|
||||
} else if (level != 0 && Token::Match(ftok, "%var% =")) // assignment in the initializer: var(value = x)
|
||||
|
|
|
@ -1270,7 +1270,7 @@ void SymbolDatabase::addNewFunction(Scope **scope, const Token **tok)
|
|||
Scope *new_scope = &scopeList.back();
|
||||
|
||||
// skip to start of function
|
||||
while (tok1 && ((tok1->str() != "{") || (tok1->previous() && tok1->previous()->isName() && tok1->strAt(-1) != "const" && Token::Match(tok1->link()->next(), ",|{|%name%")))) {
|
||||
while (tok1 && ((tok1->str() != "{") || (tok1->previous() && tok1->previous()->isName() && tok1->strAt(-1) != "const" && Token::Match(tok1->link()->next(), ",|{|%type%")))) {
|
||||
if (tok1->str() == "(" || tok1->str() == "{")
|
||||
tok1 = tok1->link();
|
||||
tok1 = tok1->next();
|
||||
|
|
Loading…
Reference in New Issue