diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index d98006d15..68a442d17 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -1397,7 +1397,7 @@ static bool matchSpecialization(const Token *templateDeclarationNameToken, const const Token *startToken = (*it); while (startToken->previous() && !Token::Match(startToken->previous(), "[;{}]")) startToken = startToken->previous(); - if (!Token::Match(startToken, "template <")) + if (!Token::simpleMatch(startToken, "template <")) continue; std::vector templateParameters; TemplateSimplifier::getTemplateParametersInDeclaration(startToken->tokAt(2), templateParameters);