aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-09 04:39:54 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-09 04:39:54 +0000
commit1d1e70ec6545c8ca863e00aaca14287269a23c1c (patch)
tree7684e6b14901879222b4bd80d9acd4a3837bfa5e /lib
parent90fb58e9f5482d2be61c4acfedf4fa69585c8ac1 (diff)
Fix g++.dg regressions introduced at r115347 (rdar://8529993)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index fa3a4047e5..8efd49580f 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3675,7 +3675,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
}
if (D.getCXXScopeSpec().isSet() && !NewFD->isInvalidDecl()) {
- if (!CurContext->isRecord()) {
+ if (isFriend || !CurContext->isRecord()) {
// Fake up an access specifier if it's supposed to be a class member.
if (!Redeclaration && isa<CXXRecordDecl>(NewFD->getDeclContext()))
NewFD->setAccess(AS_public);
@@ -3722,7 +3722,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
Diag((*Func)->getLocation(), diag::note_member_def_close_match);
}
}
- } else if (!isFriend) {
+ } else {
// The user provided a superfluous scope specifier inside a class definition:
//
// class X {