aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-09-11 17:54:14 +0000
committerAnders Carlsson <andersca@mac.com>2009-09-11 17:54:14 +0000
commit4111181534e8257f592b6b7db57694af7cd04b06 (patch)
treee52c6b9198b909e0624802a7d5435717b3df8b63 /lib
parent039e6a1b085b025c054cb66a5665ad3a77d96abd (diff)
Just ignore friend templates for now so we won't crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-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;