Fix testcases

This commit is contained in:
Daniel Marjamäki 2020-11-29 08:46:42 +01:00
parent fd75837494
commit e2debac882
3 changed files with 4 additions and 4 deletions

View File

@ -5159,7 +5159,7 @@ void Tokenizer::removeExtraTemplateKeywords()
{
if (isCPP()) {
for (Token *tok = list.front(); tok; tok = tok->next()) {
if (Token::Match(tok, "%name% .|:: template %name%"))
if (Token::Match(tok, "%name%|> .|:: template %name%"))
tok->next()->deleteNext();
}
}

View File

@ -3371,8 +3371,8 @@ private:
"template < bool b , class > using c = typename a < b > :: d ; "
"template < class , template < class > class , class > struct e ; "
"template < class f , class g , class ... h > "
"using i = typename e < f , g :: template fn , h ... > :: d ; "
"template < class ... j > struct k : c < sizeof... ( j ) , int > :: template fn < j ... > { } ;";
"using i = typename e < f , g :: fn , h ... > :: d ; "
"template < class ... j > struct k : c < sizeof... ( j ) , int > :: fn < j ... > { } ;";
ASSERT_EQUALS(exp, tok(code));
}

View File

@ -2353,7 +2353,7 @@ private:
"typename TrafoConfig > "
"class AsmTraits1 { "
"enum Anonymous0 { "
"domain_dim = SpaceType :: TrafoType :: template Evaluator < SpaceType :: TrafoType :: ShapeType , DataType > :: Type :: domain_dim , "
"domain_dim = SpaceType :: TrafoType :: Evaluator < SpaceType :: TrafoType :: ShapeType , DataType > :: Type :: domain_dim , "
"} ; } ;";
ASSERT_EQUALS(expected, tok(code));
ASSERT_EQUALS("", errout.str());