Fix default argument comma disambiguation bug following the 'template' keyword.

llvm-svn: 214051
This commit is contained in:
Richard Smith 2014-07-27 05:38:12 +00:00
parent 4137af286f
commit 9303357e73
2 changed files with 7 additions and 0 deletions

View File

@ -1014,6 +1014,7 @@ bool Parser::ConsumeAndStoreInitializer(CachedTokens &Toks,
Toks.push_back(Tok);
ConsumeToken();
if (Tok.is(tok::less)) {
++AngleCount;
++KnownTemplateCount;
Toks.push_back(Tok);
ConsumeToken();

View File

@ -169,3 +169,9 @@ namespace ElaboratedTypeSpecifiers {
enum E {};
};
}
namespace PR20459 {
template <typename EncTraits> struct A {
void foo(int = EncTraits::template TypeEnc<int, int>::val); // ok
};
}