Merge overlapping patterns
This commit is contained in:
parent
84f65c40a7
commit
c8df734c07
|
@ -2950,8 +2950,7 @@ bool TemplateSimplifier::simplifyTemplateInstantiations(
|
||||||
assert(mTokenList.validateToken(tok2)); // that assertion fails on examples from #6021
|
assert(mTokenList.validateToken(tok2)); // that assertion fails on examples from #6021
|
||||||
|
|
||||||
const Token *startToken = tok2;
|
const Token *startToken = tok2;
|
||||||
while (Token::Match(startToken->tokAt(-2), "%name% :: %name%") ||
|
while (Token::Match(startToken->tokAt(-2), ">|%name% :: %name%")) {
|
||||||
Token::Match(startToken->tokAt(-2), "> :: %name%")) {
|
|
||||||
if (startToken->strAt(-2) == ">") {
|
if (startToken->strAt(-2) == ">") {
|
||||||
const Token * tok3 = startToken->tokAt(-2)->findOpeningBracket();
|
const Token * tok3 = startToken->tokAt(-2)->findOpeningBracket();
|
||||||
if (tok3)
|
if (tok3)
|
||||||
|
@ -3012,8 +3011,7 @@ bool TemplateSimplifier::simplifyTemplateInstantiations(
|
||||||
assert(mTokenList.validateToken(tok2)); // that assertion fails on examples from #6021
|
assert(mTokenList.validateToken(tok2)); // that assertion fails on examples from #6021
|
||||||
|
|
||||||
Token *startToken = tok2;
|
Token *startToken = tok2;
|
||||||
while (Token::Match(startToken->tokAt(-2), "%name% :: %name%") ||
|
while (Token::Match(startToken->tokAt(-2), ">|%name% :: %name%")) {
|
||||||
Token::Match(startToken->tokAt(-2), "> :: %name%")) {
|
|
||||||
if (startToken->strAt(-2) == ">") {
|
if (startToken->strAt(-2) == ">") {
|
||||||
const Token * tok3 = startToken->tokAt(-2)->findOpeningBracket();
|
const Token * tok3 = startToken->tokAt(-2)->findOpeningBracket();
|
||||||
if (tok3)
|
if (tok3)
|
||||||
|
|
Loading…
Reference in New Issue