aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-11-08 16:45:02 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-11-08 16:45:02 +0000
commiteb83ecde1a822b1c38cd060a85a08c1ac9f82cf8 (patch)
tree88e967a9d871a2ea4e6d9272c20fbc057543d2c4 /lib/Parse/ParseTentative.cpp
parent3604e3895ecd850291b518e5a82246c888ce9d0f (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTentative.cpp')
-rw-r--r--lib/Parse/ParseTentative.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index 3e7aeb8f1d..4f6f117f2a 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/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();