aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-08-29 03:50:18 +0000
committerJohn McCall <rjmccall@apple.com>2009-08-29 03:50:18 +0000
commit5fee110ac106370f75592df024001de73edced2a (patch)
tree1a7a5bdb754317fc71f59ca6cd3162bf1a40410f /lib/Sema
parent2a29c4b6ef710de49b1fd72902d6930033edae24 (diff)
For consistency, just make friend declarations AS_public.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp2
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 89ea7cce27..4c4dd41017 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -3661,6 +3661,7 @@ Sema::DeclPtrTy Sema::ActOnFriendTypeDecl(Scope *S,
FriendDecl *FD = FriendDecl::Create(Context, CurContext, Loc, FU,
DS.getFriendSpecLoc());
+ FD->setAccess(AS_public);
CurContext->addDecl(FD);
return DeclPtrTy::make(FD);
@@ -3829,6 +3830,7 @@ Sema::DeclPtrTy Sema::ActOnFriendFunctionDecl(Scope *S,
FriendDecl *FrD = FriendDecl::Create(Context, CurContext,
D.getIdentifierLoc(), FD,
DS.getFriendSpecLoc());
+ FrD->setAccess(AS_public);
CurContext->addDecl(FrD);
return DeclPtrTy::make(FD);
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index df4ebfaa93..e2ebd09954 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -278,6 +278,7 @@ Decl *TemplateDeclInstantiator::VisitFriendDecl(FriendDecl *D) {
FriendDecl *FD =
FriendDecl::Create(SemaRef.Context, Owner, D->getLocation(), FU,
D->getFriendLoc());
+ FD->setAccess(AS_public);
Owner->addDecl(FD);
return FD;
}