Commit f5c9a158 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Use the start of the template-argument as to key for template-arguments cache.

parent 94d6b23d
......@@ -820,6 +820,8 @@ Parser::TemplateArgumentListEntry *Parser::templateArgumentListEntry(unsigned to
bool Parser::parseTemplateArgumentList(TemplateArgumentListAST *&node)
{
DEBUG_THIS_RULE();
if (TemplateArgumentListEntry *entry = templateArgumentListEntry(cursor())) {
rewind(entry->cursor);
node = entry->ast;
......@@ -852,11 +854,11 @@ bool Parser::parseTemplateArgumentList(TemplateArgumentListAST *&node)
}
}
_templateArgumentList.insert(std::make_pair(cursor(), TemplateArgumentListEntry(start, cursor(), node)));
_templateArgumentList.insert(std::make_pair(start, TemplateArgumentListEntry(start, cursor(), node)));
return true;
}
_templateArgumentList.insert(std::make_pair(cursor(), TemplateArgumentListEntry(start, cursor(), 0)));
_templateArgumentList.insert(std::make_pair(start, TemplateArgumentListEntry(start, cursor(), 0)));
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment