forked from OSchip/llvm-project
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
This commit is contained in:
parent
6b6a4b6446
commit
7de7fd0305
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue