Replace Token::Match with Token::simpleMatch for simple patterns
[ci skip]
This commit is contained in:
parent
5276fd68b2
commit
d40314b825
|
@ -64,7 +64,7 @@ TemplateSimplifier::TokenAndName::TokenAndName(Token *tok, const std::string &s,
|
||||||
isVariable(Token::Match(nameToken->next(), "=|;") ||
|
isVariable(Token::Match(nameToken->next(), "=|;") ||
|
||||||
(nameToken->strAt(1) == "<" && Token::Match(nameToken->next()->findClosingBracket()->next(), "=|;")));
|
(nameToken->strAt(1) == "<" && Token::Match(nameToken->next()->findClosingBracket()->next(), "=|;")));
|
||||||
isAlias(paramEnd->strAt(1) == "using");
|
isAlias(paramEnd->strAt(1) == "using");
|
||||||
isSpecialized(Token::Match(token, "template < >"));
|
isSpecialized(Token::simpleMatch(token, "template < >"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (token)
|
if (token)
|
||||||
|
@ -511,7 +511,7 @@ bool TemplateSimplifier::getTemplateDeclarations()
|
||||||
else if (tok2->str() == ")")
|
else if (tok2->str() == ")")
|
||||||
break;
|
break;
|
||||||
// skip decltype(...)
|
// skip decltype(...)
|
||||||
else if (Token::Match(tok2, "decltype ("))
|
else if (Token::simpleMatch(tok2, "decltype ("))
|
||||||
tok2 = tok2->linkAt(1);
|
tok2 = tok2->linkAt(1);
|
||||||
// Declaration => add to mTemplateForwardDeclarations
|
// Declaration => add to mTemplateForwardDeclarations
|
||||||
else if (tok2->str() == ";") {
|
else if (tok2->str() == ";") {
|
||||||
|
@ -926,7 +926,7 @@ bool TemplateSimplifier::getTemplateNamePositionTemplateFunction(const Token *to
|
||||||
if (Token::Match(tok->next(), ";|{"))
|
if (Token::Match(tok->next(), ";|{"))
|
||||||
return false;
|
return false;
|
||||||
// skip decltype(...)
|
// skip decltype(...)
|
||||||
else if (Token::Match(tok, "decltype (")) {
|
else if (Token::simpleMatch(tok, "decltype (")) {
|
||||||
const Token * end = tok->linkAt(1);
|
const Token * end = tok->linkAt(1);
|
||||||
while (tok && tok != end) {
|
while (tok && tok != end) {
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
|
|
Loading…
Reference in New Issue