summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
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
commit52da8da03bcd727f9e0060d71cae8ff04385ab84 (patch)
tree5f7b5cbb54920b6c85cf883fdfaa23dfb94eeac1 /clang/lib/Sema/SemaDecl.cpp
parentd7a404d85f60a585b72750d2fac0364cfb9633a9 (diff)
downloadbcm5719-llvm-52da8da03bcd727f9e0060d71cae8ff04385ab84.tar.gz
bcm5719-llvm-52da8da03bcd727f9e0060d71cae8ff04385ab84.zip
Fix g++.dg regressions introduced at r115347 (rdar://8529993)
llvm-svn: 116144
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index fa3a4047e59..8efd49580f0 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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 {
OpenPOWER on IntegriCloud