summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 2dac473cc6c..d885558e1f3 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -778,6 +778,19 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
continue;
}
+ if (Next.is(tok::annot_typename)) {
+ // FIXME: is this scope-specifier getting dropped?
+ ConsumeToken(); // the scope-specifier
+ if (Tok.getAnnotationValue())
+ isInvalid = DS.SetTypeSpecType(DeclSpec::TST_typename, Loc,
+ PrevSpec, DiagID,
+ Tok.getAnnotationValue());
+ else
+ DS.SetTypeSpecError();
+ DS.SetRangeEnd(Tok.getAnnotationEndLoc());
+ ConsumeToken(); // The typename
+ }
+
if (Next.isNot(tok::identifier))
goto DoneWithDeclSpec;
OpenPOWER on IntegriCloud