diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-07-23 17:44:44 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-07-23 17:44:44 +0000 |
| commit | 7de7fd030586bfa7ec4e6c3252c767e2b212fb86 (patch) | |
| tree | 74c58d9f9544bc04123951adec498e328de79ae8 | |
| parent | 6b6a4b644639093e0d8d4d61605582b0706c7cb5 (diff) | |
| download | bcm5719-llvm-7de7fd030586bfa7ec4e6c3252c767e2b212fb86.tar.gz bcm5719-llvm-7de7fd030586bfa7ec4e6c3252c767e2b212fb86.zip | |
Updated comment for class ObjCIvarDecl: it turns out the default access control
is protected, not private.
Added ObjCIvarDecl::getCanonicalAccessControl() to report the visible access
control of an ivar, whereas getAccessControl() returns the access control
relating to how the ivar was actually declared.
llvm-svn: 53954
| -rw-r--r-- | clang/include/clang/AST/DeclObjC.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h index 27760f2d765..264a84035db 100644 --- a/clang/include/clang/AST/DeclObjC.h +++ b/clang/include/clang/AST/DeclObjC.h @@ -469,7 +469,7 @@ public: /// /// @interface IvarExample : NSObject /// { -/// id defaultToPrivate; // same as C++. +/// id defaultToProtected; /// @public: /// id canBePublic; // same as C++. /// @protected: @@ -488,8 +488,14 @@ public: enum AccessControl { None, Private, Protected, Public, Package }; + void setAccessControl(AccessControl ac) { DeclAccess = ac; } + AccessControl getAccessControl() const { return AccessControl(DeclAccess); } + + AccessControl getCanonicalAccessControl() const { + return DeclAccess == None ? Protected : AccessControl(DeclAccess); + } // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return D->getKind() == ObjCIvar; } |

