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 | 15a430a368ba80ace64891fb35715f78c2673403 (patch) | |
tree | c2c270df6609d73f40d61d212d89884436153d22 /clang/lib/Parse/Parser.cpp | |
parent | 80381f6cbfb5ecdad7e81c2df0fd0f973a0242c2 (diff) | |
download | bcm5719-llvm-15a430a368ba80ace64891fb35715f78c2673403.tar.gz bcm5719-llvm-15a430a368ba80ace64891fb35715f78c2673403.zip |
Support decltype in nested-name-specifiers.
llvm-svn: 145785
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index e74c46e2fda..112d7a2d12c 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/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)) |