diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-12-04 05:04:18 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-12-04 05:04:18 +0000 |
commit | 42d6d0c91ab089cb252ab2f91c16d4557f458a2c (patch) | |
tree | 798a87db00244b0536a6b3880eb6c040218aa70d /lib/Parse/Parser.cpp | |
parent | 649657e7d6c150136cae5ab22e39b9794cff80cc (diff) |
Support decltype in nested-name-specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index e74c46e2fd..112d7a2d12 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -1202,8 +1202,8 @@ TemplateIdAnnotation *Parser::takeTemplateIdAnnotation(const Token &tok) { /// as the current tokens, so only call it in contexts where these are invalid. bool Parser::TryAnnotateTypeOrScopeToken(bool EnteringContext, bool NeedType) { assert((Tok.is(tok::identifier) || Tok.is(tok::coloncolon) - || Tok.is(tok::kw_typename) || Tok.is(tok::annot_cxxscope)) && - "Cannot be a type or scope token!"); + || Tok.is(tok::kw_typename) || Tok.is(tok::annot_cxxscope) + || Tok.is(tok::kw_decltype)) && "Cannot be a type or scope token!"); if (Tok.is(tok::kw_typename)) { // Parse a C++ typename-specifier, e.g., "typename T::type". @@ -1382,8 +1382,8 @@ bool Parser::TryAnnotateCXXScopeToken(bool EnteringContext) { assert(getLang().CPlusPlus && "Call sites of this function should be guarded by checking for C++"); assert((Tok.is(tok::identifier) || Tok.is(tok::coloncolon) || - (Tok.is(tok::annot_template_id) && NextToken().is(tok::coloncolon)))&& - "Cannot be a type or scope token!"); + (Tok.is(tok::annot_template_id) && NextToken().is(tok::coloncolon)) || + Tok.is(tok::kw_decltype)) && "Cannot be a type or scope token!"); CXXScopeSpec SS; if (ParseOptionalCXXScopeSpecifier(SS, ParsedType(), EnteringContext)) |