From d4f551b3491777ffcc7f2664327810219b7e0e16 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Mon, 11 May 2009 22:42:30 +0000 Subject: [PATCH] Fix test case by always setting the type spec type, even for friend decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71486 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseDeclCXX.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index da99ab9aa2..0718d3bfb5 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -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())) 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].