Add parsing of friend specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71067 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 8b81c31..b3c2d8c 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -597,6 +597,8 @@
/// [C99] 'inline'
/// [C++] 'virtual'
/// [C++] 'explicit'
+/// 'friend': [C++ dcl.friend]
+
///
void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
TemplateParameterLists *TemplateParams,
@@ -846,6 +848,11 @@
isInvalid = DS.SetFunctionSpecExplicit(Loc, PrevSpec);
break;
+ // friend
+ case tok::kw_friend:
+ isInvalid = DS.SetFriendSpec(Loc, PrevSpec);
+ break;
+
// type-specifier
case tok::kw_short:
isInvalid = DS.SetTypeSpecWidth(DeclSpec::TSW_short, Loc, PrevSpec);