diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-08 16:45:02 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-08 16:45:02 +0000 |
commit | 32a0379575315dcc270f9c7099b052dbb7aa7a0d (patch) | |
tree | 545dea10a5d2b337f5ad9cc7b301c125cf424751 /clang/lib/Parse/ParseTentative.cpp | |
parent | c7e67a04c396ff684b5f4478b02f9959ac38635d (diff) | |
download | bcm5719-llvm-32a0379575315dcc270f9c7099b052dbb7aa7a0d.tar.gz bcm5719-llvm-32a0379575315dcc270f9c7099b052dbb7aa7a0d.zip |
Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
No Sema functionality change, just the signatures of the Action/Sema methods.
llvm-svn: 58913
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r-- | clang/lib/Parse/ParseTentative.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index 3e7aeb8f1da..4f6f117f2a9 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -569,6 +569,9 @@ Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract, /// [GNU] restrict /// Parser::TPResult Parser::isCXXDeclarationSpecifier() { + // Annotate typenames and C++ scope specifiers. + TryAnnotateTypeOrScopeToken(); + switch (Tok.getKind()) { // decl-specifier: // storage-class-specifier @@ -634,11 +637,6 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() { // simple-type-specifier: - case tok::identifier: - if (!Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope)) - return TPResult::False(); - // FALL THROUGH. - case tok::kw_char: case tok::kw_wchar_t: case tok::kw_bool: @@ -650,6 +648,7 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() { case tok::kw_float: case tok::kw_double: case tok::kw_void: + case tok::annot_qualtypename: if (NextToken().is(tok::l_paren)) return TPResult::Ambiguous(); |