]> granicus.if.org Git - clang/commit
[Parser] Perform CachedTokens update dependent on token consumption
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 5 Feb 2016 19:36:39 +0000 (19:36 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 5 Feb 2016 19:36:39 +0000 (19:36 +0000)
commit83c02698258871896f3f173531ad6c8660ea1377
treedb4ff23cb9ac7bb952a683ebf5ae9a4b4b122df1
parentdec469b8c5c697fcf99f637c15e591f522475d2a
[Parser] Perform CachedTokens update dependent on token consumption

In the context where we break one tok::greatergreater into two
tok::greater in order to correctly update the cached tokens; update the
CachedTokens with two tok::greater only if ParseGreaterThanInTemplateList
clients asks to consume the last token. Otherwise we only need to add
one because the second is already added later on, as a not yet cached token.

Differential Revision: http://reviews.llvm.org/D16906

rdar://problem/24488367

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259910 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/ParseTemplate.cpp
test/Parser/objcxx14-protocol-in-template.mm [new file with mode: 0644]