Skip to content

Commit a5d6417

Browse files
Update templatesimplifier.cpp
1 parent 7a03d5f commit a5d6417

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/templatesimplifier.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,8 @@ void TemplateSimplifier::useDefaultArgumentValues(TokenAndName &declaration)
11531153
instantiationArgs[index].push_back(tok1);
11541154
tok1 = tok1->next();
11551155
} while (tok1 && tok1 != endLink);
1156+
if (!tok1)
1157+
syntaxError(end);
11561158
instantiationArgs[index].push_back(tok1);
11571159
} else if (tok1->str() == "<" &&
11581160
(tok1->strAt(1) == ">" || (tok1->previous()->isName() &&
@@ -1162,6 +1164,8 @@ void TemplateSimplifier::useDefaultArgumentValues(TokenAndName &declaration)
11621164
instantiationArgs[index].push_back(tok1);
11631165
tok1 = tok1->next();
11641166
} while (tok1 && tok1 != endLink);
1167+
if (!tok1)
1168+
syntaxError(end);
11651169
instantiationArgs[index].push_back(tok1);
11661170
} else if (tok1->str() == ",") {
11671171
++index;

0 commit comments

Comments
 (0)