]> granicus.if.org Git - clang/commitdiff
Fix test case by always setting the type spec type, even for friend decls.
authorAnders Carlsson <andersca@mac.com>
Mon, 11 May 2009 22:42:30 +0000 (22:42 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 11 May 2009 22:42:30 +0000 (22:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71486 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseDeclCXX.cpp

index da99ab9aa2df1498d1ff6bb9af9aaa3956277e65..0718d3bfb547e540725b63a05cfb762349b29be1 100644 (file)
@@ -530,14 +530,13 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
     return;
   }
   
-  if (DS.isFriendSpecified() && 
-      !Actions.ActOnFriendDecl(CurScope, DS.getFriendSpecLoc(), 
-                               TagOrTempResult.get()))
-    return;
-    
   if (DS.SetTypeSpecType(TagType, StartLoc, PrevSpec, 
                          TagOrTempResult.get().getAs<void>()))
     Diag(StartLoc, diag::err_invalid_decl_spec_combination) << PrevSpec;
+  
+  if (DS.isFriendSpecified())
+    Actions.ActOnFriendDecl(CurScope, DS.getFriendSpecLoc(), 
+                            TagOrTempResult.get());
 }
 
 /// ParseBaseClause - Parse the base-clause of a C++ class [C++ class.derived].