From c8df734c0747a108753ef35916e1cc6fe2283d63 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Tue, 4 Feb 2020 18:35:30 +0300 Subject: [PATCH] Merge overlapping patterns --- lib/templatesimplifier.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index 69ee96d16..aced06540 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -2950,8 +2950,7 @@ bool TemplateSimplifier::simplifyTemplateInstantiations( assert(mTokenList.validateToken(tok2)); // that assertion fails on examples from #6021 const Token *startToken = tok2; - while (Token::Match(startToken->tokAt(-2), "%name% :: %name%") || - Token::Match(startToken->tokAt(-2), "> :: %name%")) { + while (Token::Match(startToken->tokAt(-2), ">|%name% :: %name%")) { if (startToken->strAt(-2) == ">") { const Token * tok3 = startToken->tokAt(-2)->findOpeningBracket(); if (tok3) @@ -3012,8 +3011,7 @@ bool TemplateSimplifier::simplifyTemplateInstantiations( assert(mTokenList.validateToken(tok2)); // that assertion fails on examples from #6021 Token *startToken = tok2; - while (Token::Match(startToken->tokAt(-2), "%name% :: %name%") || - Token::Match(startToken->tokAt(-2), "> :: %name%")) { + while (Token::Match(startToken->tokAt(-2), ">|%name% :: %name%")) { if (startToken->strAt(-2) == ">") { const Token * tok3 = startToken->tokAt(-2)->findOpeningBracket(); if (tok3)