diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-05 01:24:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-05 01:24:05 +0000 |
commit | 7452c6fc567ea1799f617395d0fa4c7ed075e5d9 (patch) | |
tree | cf8673af65634475376dc897ff1e3b5352368993 /lib/Parse/ParseTemplate.cpp | |
parent | 835c909696ecd1e1f128297089d1def8d1a6f7cd (diff) |
TryAnnotateTypeOrScopeToken and TryAnnotateCXXScopeToken can
only be called when they might be needed now, so make them assert
that their current token is :: or identifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTemplate.cpp')
-rw-r--r-- | lib/Parse/ParseTemplate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp index 076aae38cc..f21854dc1e 100644 --- a/lib/Parse/ParseTemplate.cpp +++ b/lib/Parse/ParseTemplate.cpp @@ -318,7 +318,7 @@ Parser::ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position) { // Parse this as a typename. Declarator ParamDecl(DS, Declarator::TemplateParamContext); ParseDeclarator(ParamDecl); - if(DS.getTypeSpecType() == DeclSpec::TST_unspecified && !DS.getTypeRep()) { + if (DS.getTypeSpecType() == DeclSpec::TST_unspecified && !DS.getTypeRep()) { // This probably shouldn't happen - and it's more of a Sema thing, but // basically we didn't parse the type name because we couldn't associate // it with an AST node. we should just skip to the comma or greater. @@ -335,7 +335,7 @@ Parser::ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position) { // Is there a default value? Parsing this can be fairly annoying because // we have to stop on the first non-nested (paren'd) '>' as the closure // for the template parameter list. Or a ','. - if(Tok.is(tok::equal)) { + if (Tok.is(tok::equal)) { // TODO: Implement default non-type values. SkipUntil(tok::comma, tok::greater, true, true); } |