Fix an oversight with access control for address-of-function.

llvm-svn: 99942
This commit is contained in:
John McCall 2010-03-30 22:20:00 +00:00
parent 49b85ab6e6
commit b493d53424
1 changed files with 1 additions and 0 deletions

View File

@ -910,6 +910,7 @@ Sema::AccessResult Sema::CheckMemberOperatorAccess(SourceLocation OpLoc,
Sema::AccessResult Sema::CheckAddressOfMemberAccess(Expr *OvlExpr,
DeclAccessPair Found) {
if (!getLangOptions().AccessControl ||
Found.getAccess() == AS_none ||
Found.getAccess() == AS_public)
return AR_accessible;