clang API Documentation
#include <DeclObjC.h>
ObjCContainerDecl - Represents a container for method declarations. Current sub-classes are ObjCInterfaceDecl, ObjCCategoryDecl, ObjCProtocolDecl, and ObjCImplDecl.
Definition at line 508 of file DeclObjC.h.
typedef filtered_decl_iterator<ObjCMethodDecl, &ObjCMethodDecl::isClassMethod> clang::ObjCContainerDecl::classmeth_iterator |
Definition at line 568 of file DeclObjC.h.
typedef llvm::iterator_range<classmeth_iterator> clang::ObjCContainerDecl::classmeth_range |
Definition at line 569 of file DeclObjC.h.
typedef filtered_decl_iterator<ObjCMethodDecl, &ObjCMethodDecl::isInstanceMethod> clang::ObjCContainerDecl::instmeth_iterator |
Definition at line 553 of file DeclObjC.h.
typedef llvm::iterator_range<instmeth_iterator> clang::ObjCContainerDecl::instmeth_range |
Definition at line 554 of file DeclObjC.h.
Definition at line 537 of file DeclObjC.h.
typedef llvm::iterator_range<specific_decl_iterator<ObjCMethodDecl> > clang::ObjCContainerDecl::method_range |
Definition at line 539 of file DeclObjC.h.
Definition at line 524 of file DeclObjC.h.
typedef llvm::iterator_range<specific_decl_iterator<ObjCPropertyDecl> > clang::ObjCContainerDecl::prop_range |
Definition at line 526 of file DeclObjC.h.
typedef llvm::SmallVector<ObjCPropertyDecl*, 8> clang::ObjCContainerDecl::PropertyDeclOrder |
Definition at line 601 of file DeclObjC.h.
typedef llvm::DenseMap<IdentifierInfo*, ObjCPropertyDecl*> clang::ObjCContainerDecl::PropertyMap |
Definition at line 596 of file DeclObjC.h.
typedef llvm::DenseMap<const ObjCProtocolDecl *, ObjCPropertyDecl*> clang::ObjCContainerDecl::ProtocolPropertyMap |
Definition at line 599 of file DeclObjC.h.
clang::ObjCContainerDecl::ObjCContainerDecl | ( | Kind | DK, |
DeclContext * | DC, | ||
IdentifierInfo * | Id, | ||
SourceLocation | nameLoc, | ||
SourceLocation | atStartLoc | ||
) | [inline] |
Definition at line 518 of file DeclObjC.h.
static ObjCContainerDecl* clang::ObjCContainerDecl::castFromDeclContext | ( | const DeclContext * | DC | ) | [inline, static] |
Reimplemented from clang::Decl.
Definition at line 634 of file DeclObjC.h.
static DeclContext* clang::ObjCContainerDecl::castToDeclContext | ( | const ObjCContainerDecl * | D | ) | [inline, static] |
Definition at line 631 of file DeclObjC.h.
classmeth_range clang::ObjCContainerDecl::class_methods | ( | ) | const [inline] |
Definition at line 571 of file DeclObjC.h.
References classmeth_begin(), and classmeth_end().
Referenced by clang::Sema::CheckCategoryVsClassMethodMatches(), CheckProtocolMethodDefs(), clang::Sema::ImplMethodsVsClassMethods(), and clang::Sema::MatchAllMethodDeclarations().
classmeth_iterator clang::ObjCContainerDecl::classmeth_begin | ( | ) | const [inline] |
Definition at line 574 of file DeclObjC.h.
References clang::DeclContext::decls_begin().
Referenced by class_methods().
classmeth_iterator clang::ObjCContainerDecl::classmeth_end | ( | ) | const [inline] |
Definition at line 577 of file DeclObjC.h.
References clang::DeclContext::decls_end().
Referenced by class_methods().
static bool clang::ObjCContainerDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::NamedDecl.
Reimplemented in clang::ObjCImplementationDecl, clang::ObjCCategoryImplDecl, clang::ObjCImplDecl, clang::ObjCCategoryDecl, clang::ObjCProtocolDecl, and clang::ObjCInterfaceDecl.
Definition at line 625 of file DeclObjC.h.
References classofKind(), and clang::Decl::getKind().
static bool clang::ObjCContainerDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::NamedDecl.
Reimplemented in clang::ObjCImplementationDecl, clang::ObjCCategoryImplDecl, clang::ObjCImplDecl, clang::ObjCCategoryDecl, clang::ObjCProtocolDecl, and clang::ObjCInterfaceDecl.
Definition at line 626 of file DeclObjC.h.
Referenced by classof().
virtual void clang::ObjCContainerDecl::collectPropertiesToImplement | ( | PropertyMap & | PM, |
PropertyDeclOrder & | PO | ||
) | const [inline, virtual] |
This routine collects list of properties to be implemented in the class. This includes, class's and its conforming protocols' properties. Note, the superclass's properties are not included in the list.
Reimplemented in clang::ObjCProtocolDecl, and clang::ObjCInterfaceDecl.
Definition at line 606 of file DeclObjC.h.
ObjCPropertyDecl * ObjCContainerDecl::FindPropertyDeclaration | ( | IdentifierInfo * | PropertyId | ) | const |
FindPropertyDeclaration - Finds declaration of the property given its name in 'PropertyId' and returns it. It returns 0, if not found.
Definition at line 185 of file DeclObjC.cpp.
References clang::ObjCInterfaceDecl::all_referenced_protocols(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getKind(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCCategoryDecl::IsClassExtension(), P, clang::ObjCProtocolDecl::protocols(), clang::ObjCCategoryDecl::protocols(), and clang::ObjCInterfaceDecl::visible_categories().
Referenced by clang::Sema::ActOnPropertyImplDecl(), clang::Sema::CodeCompleteObjCPropertySynthesizeIvar(), FindGetterSetterNameDeclFromProtocolList(), clang::Sema::HandleExprPropertyRefExpr(), and LookupMemberExpr().
SourceRange clang::ObjCContainerDecl::getAtEndRange | ( | ) | const [inline] |
Definition at line 613 of file DeclObjC.h.
Referenced by getSourceRange(), and clang::ASTDeclWriter::VisitObjCContainerDecl().
SourceLocation clang::ObjCContainerDecl::getAtStartLoc | ( | ) | const [inline] |
Definition at line 609 of file DeclObjC.h.
Referenced by clang::ObjCInterfaceDecl::getSourceRange(), clang::ObjCProtocolDecl::getSourceRange(), clang::ASTNodeImporter::VisitObjCCategoryDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTDeclWriter::VisitObjCContainerDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCInterfaceDecl(), and clang::ASTNodeImporter::VisitObjCProtocolDecl().
ObjCMethodDecl* clang::ObjCContainerDecl::getClassMethod | ( | Selector | Sel, |
bool | AllowHidden = false |
||
) | const [inline] |
Definition at line 588 of file DeclObjC.h.
References getMethod().
Referenced by clang::ObjCInterfaceDecl::getCategoryMethod(), and clang::Sema::MatchAllMethodDeclarations().
ObjCMethodDecl* clang::ObjCContainerDecl::getInstanceMethod | ( | Selector | Sel, |
bool | AllowHidden = false |
||
) | const [inline] |
Definition at line 584 of file DeclObjC.h.
References getMethod().
Referenced by clang::Sema::AtomicPropertySetterGetterRules(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), FindGetterSetterNameDeclFromProtocolList(), clang::ObjCInterfaceDecl::getCategoryMethod(), clang::ObjCInterfaceDecl::isDesignatedInitializer(), clang::Sema::MatchAllMethodDeclarations(), clang::Sema::ProcessPropertyDecl(), and SuperClassImplementsProperty().
ObjCIvarDecl * ObjCContainerDecl::getIvarDecl | ( | IdentifierInfo * | Id | ) | const |
getIvarDecl - This method looks up an ivar in this ContextDecl.
Definition at line 56 of file DeclObjC.cpp.
References clang::DeclContext::lookup().
Referenced by clang::Sema::ActOnFields(), clang::Sema::CheckImplementationIvars(), and clang::ObjCInterfaceDecl::lookupInstanceVariable().
ObjCMethodDecl * ObjCContainerDecl::getMethod | ( | Selector | Sel, |
bool | isInstance, | ||
bool | AllowHidden = false |
||
) | const |
Definition at line 68 of file DeclObjC.cpp.
References clang::ObjCProtocolDecl::getDefinition(), clang::ObjCMethodDecl::isInstanceMethod(), and clang::DeclContext::lookup().
Referenced by AddSuperSendCompletion(), CollectOverriddenMethodsRecurse(), collectOverriddenMethodsSlow(), findExplicitInstancetypeDeclarer(), getClassMethod(), getInstanceMethod(), clang::ObjCInterfaceDecl::lookupMethod(), and clang::ObjCProtocolDecl::lookupMethod().
SourceRange clang::ObjCContainerDecl::getSourceRange | ( | ) | const [inline, override, virtual] |
Source range that this declaration covers.
Reimplemented from clang::Decl.
Reimplemented in clang::ObjCProtocolDecl, and clang::ObjCInterfaceDecl.
Definition at line 620 of file DeclObjC.h.
References getAtEndRange().
bool ObjCContainerDecl::HasUserDeclaredSetterMethod | ( | const ObjCPropertyDecl * | Property | ) | const |
HasUserDeclaredSetterMethod - This routine returns 'true' if a user declared setter method was found in the class, its protocols, its super classes or categories. It also returns 'true' if one of its categories has declared a 'readwrite' property. This is because, user must provide a setter method for the category's 'readwrite' property.
Definition at line 102 of file DeclObjC.cpp.
References clang::NamedDecl::getIdentifier(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCInterfaceDecl::getSuperClass(), HasUserDeclaredSetterMethod(), clang::Decl::isImplicit(), clang::ObjCMethodDecl::isInstanceMethod(), clang::DeclContext::lookup(), clang::ObjCPropertyDecl::OBJC_PR_readwrite, and P.
Referenced by clang::Sema::DefaultSynthesizeProperties(), and HasUserDeclaredSetterMethod().
instmeth_range clang::ObjCContainerDecl::instance_methods | ( | ) | const [inline] |
Definition at line 556 of file DeclObjC.h.
References instmeth_begin(), and instmeth_end().
Referenced by clang::Sema::CheckCategoryVsClassMethodMatches(), checkObjCDealloc(), CheckObjCInstMethSignature(), CheckProtocolMethodDefs(), clang::Sema::DiagnoseMissingDesignatedInitOverrides(), clang::Sema::DiagnoseUnimplementedProperties(), clang::Sema::DiagnoseUnusedBackingIvarInAccessor(), clang::ObjCInterfaceDecl::getDesignatedInitializers(), clang::Sema::ImplMethodsVsClassMethods(), isIntroducingInitializers(), clang::Sema::MatchAllMethodDeclarations(), and Scan().
instmeth_iterator clang::ObjCContainerDecl::instmeth_begin | ( | ) | const [inline] |
Definition at line 559 of file DeclObjC.h.
References clang::DeclContext::decls_begin().
Referenced by instance_methods().
instmeth_iterator clang::ObjCContainerDecl::instmeth_end | ( | ) | const [inline] |
Definition at line 562 of file DeclObjC.h.
References clang::DeclContext::decls_end().
Referenced by instance_methods().
method_iterator clang::ObjCContainerDecl::meth_begin | ( | ) | const [inline] |
Definition at line 544 of file DeclObjC.h.
References clang::DeclContext::decls_begin().
Referenced by methods().
method_iterator clang::ObjCContainerDecl::meth_end | ( | ) | const [inline] |
Definition at line 547 of file DeclObjC.h.
References clang::DeclContext::decls_end().
Referenced by methods().
method_range clang::ObjCContainerDecl::methods | ( | ) | const [inline] |
Definition at line 541 of file DeclObjC.h.
References meth_begin(), and meth_end().
Referenced by AddObjCMethods(), AddObjCProperties(), clang::Sema::DiagnoseClassExtensionDupMethods(), FindImplementableMethods(), and PassObjCImplDeclToConsumer().
prop_iterator clang::ObjCContainerDecl::prop_begin | ( | ) | const [inline] |
Definition at line 529 of file DeclObjC.h.
References clang::DeclContext::decls_begin().
Referenced by properties().
prop_iterator clang::ObjCContainerDecl::prop_end | ( | ) | const [inline] |
Definition at line 532 of file DeclObjC.h.
References clang::DeclContext::decls_end().
Referenced by properties().
prop_range clang::ObjCContainerDecl::properties | ( | ) | const [inline] |
Definition at line 528 of file DeclObjC.h.
References prop_begin(), and prop_end().
Referenced by AddObjCProperties(), clang::Sema::AtomicPropertySetterGetterRules(), clang::ObjCInterfaceDecl::collectPropertiesToImplement(), clang::ObjCMethodDecl::findPropertyDecl(), and clang::Sema::IvarBacksCurrentMethodAccessor().
void clang::ObjCContainerDecl::setAtEndRange | ( | SourceRange | atEnd | ) | [inline] |
Definition at line 616 of file DeclObjC.h.
Referenced by clang::Sema::ActOnForwardClassDeclaration(), and clang::ASTDeclReader::VisitObjCContainerDecl().
void clang::ObjCContainerDecl::setAtStartLoc | ( | SourceLocation | Loc | ) | [inline] |
Definition at line 610 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCContainerDecl().