diff options
author | John McCall <rjmccall@apple.com> | 2010-04-06 21:38:20 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-04-06 21:38:20 +0000 |
commit | 161755a09898c95d21bfff33707da9ca41cd53c5 (patch) | |
tree | 4d28a74efb5679a70228e2612b17b9bdb2785f78 /lib/Sema/SemaOverload.cpp | |
parent | 2e4c7a5865739709a310d847da34096aa402d183 (diff) |
Implement the protected access restriction ([class.protected]), which requires
that protected members be used on objects of types which derive from the
naming class of the lookup. My first N attempts at this were poorly-founded,
largely because the standard is very badly worded here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index bc10a58d6b..3fabbbbffe 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -6003,7 +6003,7 @@ Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, MemberExpr *MemExpr; CXXMethodDecl *Method = 0; - NamedDecl *FoundDecl = 0; + DeclAccessPair FoundDecl; NestedNameSpecifier *Qualifier = 0; if (isa<MemberExpr>(NakedMemExpr)) { MemExpr = cast<MemberExpr>(NakedMemExpr); @@ -6486,7 +6486,7 @@ Sema::BuildOverloadedArrowExpr(Scope *S, ExprArg BaseIn, SourceLocation OpLoc) { /// perhaps a '&' around it). We have resolved the overloaded function /// to the function declaration Fn, so patch up the expression E to /// refer (possibly indirectly) to Fn. Returns the new expr. -Expr *Sema::FixOverloadedFunctionReference(Expr *E, NamedDecl *Found, +Expr *Sema::FixOverloadedFunctionReference(Expr *E, DeclAccessPair Found, FunctionDecl *Fn) { if (ParenExpr *PE = dyn_cast<ParenExpr>(E)) { Expr *SubExpr = FixOverloadedFunctionReference(PE->getSubExpr(), @@ -6619,7 +6619,7 @@ Expr *Sema::FixOverloadedFunctionReference(Expr *E, NamedDecl *Found, } Sema::OwningExprResult Sema::FixOverloadedFunctionReference(OwningExprResult E, - NamedDecl *Found, + DeclAccessPair Found, FunctionDecl *Fn) { return Owned(FixOverloadedFunctionReference((Expr *)E.get(), Found, Fn)); } |