Skip to content

Commit d0fb538

Browse files
committed
fix TestValueFlow failure
1 parent d27dfca commit d0fb538

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/templatesimplifier.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,17 +2111,16 @@ void TemplateSimplifier::expandTemplate(
21112111
if (Token::Match(declTok->previous(), "[<,]")) {
21122112
const Token* typetok = mTypesUsedInTemplateInstantiation[itype].token();
21132113
mTokenList.addtoken("(", declTok);
2114-
mTokenList.back()->templateArgFrom(declTok);
21152114
Token* const par1 = mTokenList.back();
21162115
while (declTok != typeParametersInDeclaration[itype]) {
21172116
mTokenList.addtoken(declTok);
2118-
mTokenList.back()->templateArgFrom(declTok);
21192117
declTok = declTok->next();
21202118
}
21212119
mTokenList.addtoken(")", declTok);
2122-
mTokenList.back()->templateArgFrom(declTok);
21232120
Token::createMutualLinks(par1, mTokenList.back());
21242121
mTokenList.addtoken(typetok, tok3);
2122+
for (Token* t = par1; t; t = t->next())
2123+
t->templateArgFrom(typetok);
21252124
continue;
21262125
}
21272126
}

0 commit comments

Comments
 (0)