aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Parse/ParseDeclCXX.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 8fa8525750..bb268e70c0 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -1014,10 +1014,13 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
if (Tok.is(tok::semi)) {
ConsumeToken();
- // FIXME: Friend templates?
- if (DS.isFriendSpecified())
+ if (DS.isFriendSpecified()) {
+ // FIXME: Friend templates are ignored for now.
+ if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate)
+ return;
+
Actions.ActOnFriendDecl(CurScope, &DS, /*IsDefinition*/ false);
- else
+ } else
Actions.ParsedFreeStandingDeclSpec(CurScope, DS);
return;