diff options
| author | Steve Naroff <snaroff@apple.com> | 2009-03-26 16:01:08 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2009-03-26 16:01:08 +0000 |
| commit | 389925dc87b6d96ccd6787f1dca67ac8c26caae2 (patch) | |
| tree | 81033c0d707086b358c6600805180d6790b04287 /clang/lib | |
| parent | c7fd57a2f3c86b7ac40e60138f38c51cece90a62 (diff) | |
| download | bcm5719-llvm-389925dc87b6d96ccd6787f1dca67ac8c26caae2.tar.gz bcm5719-llvm-389925dc87b6d96ccd6787f1dca67ac8c26caae2.zip | |
Fix <rdar://problem/6697053> instance variable is protected.
Treat @package the same as @public. The documentation for @package says it is analogous to private_extern for variables/functions. Fully implementing this requires some kind of linker support (so access is denied to code outside the classes executable image). I don't believe GCC fully implements this semantic. Will discuss with Fariborz offline.
llvm-svn: 67755
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index d2972caff7d..c46bde00ffc 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1876,7 +1876,8 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc, // Check whether we can reference this field. if (DiagnoseUseOfDecl(IV, MemberLoc)) return ExprError(); - if (IV->getAccessControl() != ObjCIvarDecl::Public) { + if (IV->getAccessControl() != ObjCIvarDecl::Public && + IV->getAccessControl() != ObjCIvarDecl::Package) { ObjCInterfaceDecl *ClassOfMethodDecl = 0; if (ObjCMethodDecl *MD = getCurMethodDecl()) ClassOfMethodDecl = MD->getClassInterface(); |

