clang API Documentation
#include <DeclObjC.h>
Public Types | |
enum | AccessControl { None, Private, Protected, Public, Package } |
Public Member Functions | |
const ObjCInterfaceDecl * | getContainingInterface () const |
Return the class interface that this ivar is logically contained in; this is either the interface where the ivar was declared, or the interface the ivar is conceptually a part of in the case of synthesized ivars. | |
ObjCIvarDecl * | getNextIvar () |
const ObjCIvarDecl * | getNextIvar () const |
void | setNextIvar (ObjCIvarDecl *ivar) |
void | setAccessControl (AccessControl ac) |
AccessControl | getAccessControl () const |
AccessControl | getCanonicalAccessControl () const |
void | setSynthesize (bool synth) |
bool | getSynthesize () const |
Static Public Member Functions | |
static ObjCIvarDecl * | Create (ASTContext &C, ObjCContainerDecl *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW=nullptr, bool synthesized=false) |
static ObjCIvarDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
ObjCIvarDecl - Represents an ObjC instance variable. In general, ObjC instance variables are identical to C. The only exception is Objective-C supports C++ style access control. For example:
@interface IvarExample : NSObject { id defaultToProtected; @public: id canBePublic; // same as C++. @protected: id canBeProtected; // same as C++. @package: id canBePackage; // framework visibility (not available in C++). }
Definition at line 1392 of file DeclObjC.h.
Definition at line 1396 of file DeclObjC.h.
static bool clang::ObjCIvarDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::FieldDecl.
Definition at line 1441 of file DeclObjC.h.
References classofKind(), and clang::Decl::getKind().
static bool clang::ObjCIvarDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::FieldDecl.
Definition at line 1442 of file DeclObjC.h.
Referenced by classof(), and clang::ASTDeclWriter::VisitFieldDecl().
ObjCIvarDecl * ObjCIvarDecl::Create | ( | ASTContext & | C, |
ObjCContainerDecl * | DC, | ||
SourceLocation | StartLoc, | ||
SourceLocation | IdLoc, | ||
IdentifierInfo * | Id, | ||
QualType | T, | ||
TypeSourceInfo * | TInfo, | ||
AccessControl | ac, | ||
Expr * | BW = nullptr , |
||
bool | synthesized = false |
||
) | [static] |
Definition at line 1430 of file DeclObjC.cpp.
References AttributeLangSupport::C, and clang::ObjCInterfaceDecl::setIvarList().
Referenced by clang::Sema::ActOnIvar(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnPropertyImplDecl(), and clang::ASTNodeImporter::VisitObjCIvarDecl().
ObjCIvarDecl * ObjCIvarDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
Reimplemented from clang::FieldDecl.
Definition at line 1466 of file DeclObjC.cpp.
References AttributeLangSupport::C, and None.
AccessControl clang::ObjCIvarDecl::getAccessControl | ( | ) | const [inline] |
Definition at line 1431 of file DeclObjC.h.
Referenced by checkARCPropertyImpl(), clang::Sema::LookupInObjCMethod(), LookupMemberExpr(), clang::ASTDeclWriter::VisitObjCIvarDecl(), and clang::ASTNodeImporter::VisitObjCIvarDecl().
AccessControl clang::ObjCIvarDecl::getCanonicalAccessControl | ( | ) | const [inline] |
Definition at line 1433 of file DeclObjC.h.
const ObjCInterfaceDecl * ObjCIvarDecl::getContainingInterface | ( | ) | const |
Return the class interface that this ivar is logically contained in; this is either the interface where the ivar was declared, or the interface the ivar is conceptually a part of in the case of synthesized ivars.
Definition at line 1472 of file DeclObjC.cpp.
References clang::ObjCCategoryDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::Decl::getKind(), and clang::ObjCCategoryDecl::IsClassExtension().
Referenced by createObjCPropertyGetter(), and LookupFieldBitOffset().
ObjCIvarDecl* clang::ObjCIvarDecl::getNextIvar | ( | ) | [inline] |
Definition at line 1425 of file DeclObjC.h.
Referenced by clang::Sema::CodeCompleteObjCPropertySynthesizeIvar(), clang::Sema::CollectIvarsToConstructOrDestruct(), clang::ASTContext::DeepCollectObjCIvars(), emitCXXDestructMethod(), FindIvarInterface(), LookupFieldBitOffset(), and needsDestructMethod().
const ObjCIvarDecl* clang::ObjCIvarDecl::getNextIvar | ( | ) | const [inline] |
Definition at line 1426 of file DeclObjC.h.
bool clang::ObjCIvarDecl::getSynthesize | ( | ) | const [inline] |
Definition at line 1438 of file DeclObjC.h.
Referenced by clang::Sema::ActOnPropertyImplDecl(), clang::Sema::IvarBacksCurrentMethodAccessor(), clang::ASTDeclWriter::VisitObjCIvarDecl(), and clang::ASTNodeImporter::VisitObjCIvarDecl().
void clang::ObjCIvarDecl::setAccessControl | ( | AccessControl | ac | ) | [inline] |
Definition at line 1429 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCIvarDecl().
void clang::ObjCIvarDecl::setNextIvar | ( | ObjCIvarDecl * | ivar | ) | [inline] |
Definition at line 1427 of file DeclObjC.h.
Referenced by clang::ObjCInterfaceDecl::all_declared_ivar_begin(), and clang::ASTDeclReader::VisitObjCIvarDecl().
void clang::ObjCIvarDecl::setSynthesize | ( | bool | synth | ) | [inline] |
Definition at line 1437 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCIvarDecl().