clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends
clang::ObjCInterfaceDecl Class Reference

Represents an ObjC class declaration. More...

#include <DeclObjC.h>

Inheritance diagram for clang::ObjCInterfaceDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::ObjCInterfaceDecl:
Collaboration graph
[legend]

List of all members.

Classes

struct  DefinitionData
class  filtered_category_iterator
 Iterator that walks over the list of categories, filtering out those that do not meet specific criteria. More...

Public Types

typedef ObjCProtocolList::iterator protocol_iterator
typedef llvm::iterator_range
< protocol_iterator
protocol_range
typedef
ObjCProtocolList::loc_iterator 
protocol_loc_iterator
typedef llvm::iterator_range
< protocol_loc_iterator
protocol_loc_range
typedef ObjCList
< ObjCProtocolDecl >::iterator 
all_protocol_iterator
typedef llvm::iterator_range
< all_protocol_iterator
all_protocol_range
typedef specific_decl_iterator
< ObjCIvarDecl
ivar_iterator
typedef llvm::iterator_range
< specific_decl_iterator
< ObjCIvarDecl > > 
ivar_range
typedef
filtered_category_iterator
< isVisibleCategory > 
visible_categories_iterator
 Iterator that walks over the list of categories and extensions that are visible, i.e., not hidden in a non-imported submodule.
typedef llvm::iterator_range
< visible_categories_iterator
visible_categories_range
typedef
filtered_category_iterator
< isKnownCategory > 
known_categories_iterator
 Iterator that walks over all of the known categories and extensions, including those that are hidden.
typedef llvm::iterator_range
< known_categories_iterator
known_categories_range
typedef
filtered_category_iterator
< isVisibleExtension > 
visible_extensions_iterator
 Iterator that walks over all of the visible extensions, skipping any that are known but hidden.
typedef llvm::iterator_range
< visible_extensions_iterator
visible_extensions_range
typedef
filtered_category_iterator
< isKnownExtension > 
known_extensions_iterator
 Iterator that walks over all of the known extensions.
typedef llvm::iterator_range
< known_extensions_iterator
known_extensions_range
typedef
redeclarable_base::redecl_range 
redecl_range
typedef
redeclarable_base::redecl_iterator 
redecl_iterator

Public Member Functions

SourceRange getSourceRange () const override LLVM_READONLY
 Source range that this declaration covers.
void setExternallyCompleted ()
 Indicate that this Objective-C class is complete, but that the external AST source will be responsible for filling in its contents when a complete class is required.
void setHasDesignatedInitializers ()
bool hasDesignatedInitializers () const
bool declaresOrInheritsDesignatedInitializers () const
const ObjCProtocolListgetReferencedProtocols () const
ObjCImplementationDeclgetImplementation () const
void setImplementation (ObjCImplementationDecl *ImplD)
ObjCCategoryDeclFindCategoryDeclaration (IdentifierInfo *CategoryId) const
ObjCMethodDeclgetCategoryInstanceMethod (Selector Sel) const
ObjCMethodDeclgetCategoryClassMethod (Selector Sel) const
ObjCMethodDeclgetCategoryMethod (Selector Sel, bool isInstance) const
protocol_range protocols () const
protocol_iterator protocol_begin () const
protocol_iterator protocol_end () const
protocol_loc_range protocol_locs () const
protocol_loc_iterator protocol_loc_begin () const
protocol_loc_iterator protocol_loc_end () const
all_protocol_range all_referenced_protocols () const
all_protocol_iterator all_referenced_protocol_begin () const
all_protocol_iterator all_referenced_protocol_end () const
ivar_range ivars () const
ivar_iterator ivar_begin () const
ivar_iterator ivar_end () const
unsigned ivar_size () const
bool ivar_empty () const
ObjCIvarDeclall_declared_ivar_begin ()
const ObjCIvarDeclall_declared_ivar_begin () const
void setIvarList (ObjCIvarDecl *ivar)
void setProtocolList (ObjCProtocolDecl *const *List, unsigned Num, const SourceLocation *Locs, ASTContext &C)
void mergeClassExtensionProtocolList (ObjCProtocolDecl *const *List, unsigned Num, ASTContext &C)
StringRef getObjCRuntimeNameAsString () const
void getDesignatedInitializers (llvm::SmallVectorImpl< const ObjCMethodDecl * > &Methods) const
bool isDesignatedInitializer (Selector Sel, const ObjCMethodDecl **InitMethod=nullptr) const
bool isThisDeclarationADefinition () const
 Determine whether this particular declaration of this class is actually also a definition.
bool hasDefinition () const
 Determine whether this class has been defined.
ObjCInterfaceDeclgetDefinition ()
 Retrieve the definition of this class, or NULL if this class has been forward-declared (with @class) but not yet defined (with @interface).
const ObjCInterfaceDeclgetDefinition () const
 Retrieve the definition of this class, or NULL if this class has been forward-declared (with @class) but not yet defined (with @interface).
void startDefinition ()
 Starts the definition of this Objective-C class, taking it from a forward declaration (@class) to a definition (@interface).
ObjCInterfaceDeclgetSuperClass () const
void setSuperClass (ObjCInterfaceDecl *superCls)
visible_categories_range visible_categories () const
visible_categories_iterator visible_categories_begin () const
 Retrieve an iterator to the beginning of the visible-categories list.
visible_categories_iterator visible_categories_end () const
 Retrieve an iterator to the end of the visible-categories list.
bool visible_categories_empty () const
 Determine whether the visible-categories list is empty.
known_categories_range known_categories () const
known_categories_iterator known_categories_begin () const
 Retrieve an iterator to the beginning of the known-categories list.
known_categories_iterator known_categories_end () const
 Retrieve an iterator to the end of the known-categories list.
bool known_categories_empty () const
 Determine whether the known-categories list is empty.
visible_extensions_range visible_extensions () const
visible_extensions_iterator visible_extensions_begin () const
 Retrieve an iterator to the beginning of the visible-extensions list.
visible_extensions_iterator visible_extensions_end () const
 Retrieve an iterator to the end of the visible-extensions list.
bool visible_extensions_empty () const
 Determine whether the visible-extensions list is empty.
known_extensions_range known_extensions () const
known_extensions_iterator known_extensions_begin () const
 Retrieve an iterator to the beginning of the known-extensions list.
known_extensions_iterator known_extensions_end () const
 Retrieve an iterator to the end of the known-extensions list.
bool known_extensions_empty () const
 Determine whether the known-extensions list is empty.
ObjCCategoryDeclgetCategoryListRaw () const
 Retrieve the raw pointer to the start of the category/extension list.
void setCategoryListRaw (ObjCCategoryDecl *category)
 Set the raw pointer to the start of the category/extension list.
ObjCPropertyDeclFindPropertyVisibleInPrimaryClass (IdentifierInfo *PropertyId) const
void collectPropertiesToImplement (PropertyMap &PM, PropertyDeclOrder &PO) const override
bool isSuperClassOf (const ObjCInterfaceDecl *I) const
bool isArcWeakrefUnavailable () const
const ObjCInterfaceDeclisObjCRequiresPropertyDefs () const
ObjCIvarDecllookupInstanceVariable (IdentifierInfo *IVarName, ObjCInterfaceDecl *&ClassDeclared)
ObjCIvarDecllookupInstanceVariable (IdentifierInfo *IVarName)
ObjCProtocolDecllookupNestedProtocol (IdentifierInfo *Name)
ObjCMethodDecllookupMethod (Selector Sel, bool isInstance, bool shallowCategoryLookup=false, bool followSuper=true, const ObjCCategoryDecl *C=nullptr) const
ObjCMethodDecllookupInstanceMethod (Selector Sel) const
 Lookup an instance method for a given selector.
ObjCMethodDecllookupClassMethod (Selector Sel) const
 Lookup a class method for a given selector.
ObjCInterfaceDecllookupInheritedClass (const IdentifierInfo *ICName)
ObjCMethodDecllookupPrivateMethod (const Selector &Sel, bool Instance=true) const
 Lookup a method in the classes implementation hierarchy.
ObjCMethodDecllookupPrivateClassMethod (const Selector &Sel)
ObjCMethodDecllookupPropertyAccessor (const Selector Sel, const ObjCCategoryDecl *Cat) const
 Lookup a setter or getter in the class hierarchy, including in all categories except for category passed as argument.
SourceLocation getEndOfDefinitionLoc () const
void setEndOfDefinitionLoc (SourceLocation LE)
void setSuperClassLoc (SourceLocation Loc)
SourceLocation getSuperClassLoc () const
bool isImplicitInterfaceDecl () const
bool ClassImplementsProtocol (ObjCProtocolDecl *lProto, bool lookupCategory, bool RHSIsQualifiedID=false)
ObjCInterfaceDeclgetCanonicalDecl () override
 Retrieves the canonical declaration of this Objective-C class.
const ObjCInterfaceDeclgetCanonicalDecl () const
const TypegetTypeForDecl () const
void setTypeForDecl (const Type *TD) const

Static Public Member Functions

static ObjCInterfaceDeclCreate (const ASTContext &C, DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, ObjCInterfaceDecl *PrevDecl, SourceLocation ClassLoc=SourceLocation(), bool isInternal=false)
static ObjCInterfaceDeclCreateDeserialized (const ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Friends

class ASTContext
class ASTReader
class ASTDeclReader
class ASTDeclWriter

Detailed Description

Represents an ObjC class declaration.

For example:

   // MostPrimitive declares no super class (not particularly useful).
   \@interface MostPrimitive
     // no instance variables or methods.
   \@end

   // NSResponder inherits from NSObject & implements NSCoding (a protocol).
   \@interface NSResponder : NSObject \<NSCoding>
   { // instance variables are represented by ObjCIvarDecl.
     id nextResponder; // nextResponder instance variable.
   }
   - (NSResponder *)nextResponder; // return a pointer to NSResponder.
   - (void)mouseMoved:(NSEvent *)theEvent; // return void, takes a pointer
   \@end                                    // to an NSEvent.

Unlike C/C++, forward class declarations are accomplished with @class. Unlike C/C++, @class allows for a list of classes to be forward declared. Unlike C++, ObjC is a single-rooted class model. In Cocoa, classes typically inherit from NSObject (an exception is NSProxy).

Definition at line 664 of file DeclObjC.h.


Member Typedef Documentation

Definition at line 881 of file DeclObjC.h.

Definition at line 882 of file DeclObjC.h.

Definition at line 913 of file DeclObjC.h.

Definition at line 914 of file DeclObjC.h.

Iterator that walks over all of the known categories and extensions, including those that are hidden.

Definition at line 1134 of file DeclObjC.h.

Definition at line 1136 of file DeclObjC.h.

Iterator that walks over all of the known extensions.

Definition at line 1204 of file DeclObjC.h.

Definition at line 1206 of file DeclObjC.h.

Definition at line 826 of file DeclObjC.h.

Definition at line 853 of file DeclObjC.h.

Definition at line 854 of file DeclObjC.h.

Definition at line 827 of file DeclObjC.h.

typedef redeclarable_base::redecl_iterator clang::ObjCInterfaceDecl::redecl_iterator

Definition at line 1349 of file DeclObjC.h.

Reimplemented from clang::Redeclarable< ObjCInterfaceDecl >.

Definition at line 1348 of file DeclObjC.h.

Iterator that walks over the list of categories and extensions that are visible, i.e., not hidden in a non-imported submodule.

Definition at line 1099 of file DeclObjC.h.

Definition at line 1102 of file DeclObjC.h.

Iterator that walks over all of the visible extensions, skipping any that are known but hidden.

Definition at line 1169 of file DeclObjC.h.

Definition at line 1172 of file DeclObjC.h.


Member Function Documentation

all_declared_ivar_begin - return first ivar declared in this class, its extensions and its implementation. Lazily build the list on first access.

Caveat: The list returned by this method reflects the current state of the parser. The cache will be updated for every ivar added by an extension or the implementation when they are encountered. See also ObjCIvarDecl::Create().

Definition at line 1274 of file DeclObjC.cpp.

References getImplementation(), hasDefinition(), ivar_begin(), ivar_empty(), ivar_end(), known_extensions(), and clang::ObjCIvarDecl::setNextIvar().

Referenced by all_declared_ivar_begin(), clang::Sema::CodeCompleteObjCPropertySynthesizeIvar(), clang::Sema::CollectIvarsToConstructOrDestruct(), clang::ASTContext::DeepCollectObjCIvars(), emitCXXDestructMethod(), FindIvarInterface(), LookupFieldBitOffset(), and needsDestructMethod().

Definition at line 939 of file DeclObjC.h.

References all_declared_ivar_begin().

Definition at line 888 of file DeclObjC.h.

References hasDefinition(), and protocol_begin().

Referenced by all_referenced_protocols().

Definition at line 900 of file DeclObjC.h.

References hasDefinition(), and protocol_end().

Referenced by all_referenced_protocols().

bool ObjCInterfaceDecl::ClassImplementsProtocol ( ObjCProtocolDecl lProto,
bool  lookupCategory,
bool  RHSIsQualifiedID = false 
)

ClassImplementsProtocol - Checks that 'lProto' protocol has been implemented in IDecl class, its super class or categories (if lookupCategory is true).

Definition at line 1385 of file DeclObjC.cpp.

References ClassImplementsProtocol(), clang::Decl::getASTContext(), getSuperClass(), hasDefinition(), clang::ASTContext::ProtocolCompatibleWithProtocol(), protocols(), and visible_categories().

Referenced by ClassImplementsProtocol(), clang::Sema::CreatePropertyDecl(), and clang::ASTContext::ObjCObjectAdoptsQTypeProtocols().

static bool clang::ObjCInterfaceDecl::classof ( const Decl D) [inline, static]

Reimplemented from clang::ObjCContainerDecl.

Definition at line 1365 of file DeclObjC.h.

References classofKind(), and clang::Decl::getKind().

static bool clang::ObjCInterfaceDecl::classofKind ( Kind  K) [inline, static]

Reimplemented from clang::ObjCContainerDecl.

Definition at line 1366 of file DeclObjC.h.

Referenced by classof().

void ObjCInterfaceDecl::collectPropertiesToImplement ( PropertyMap PM,
PropertyDeclOrder PO 
) const [override, 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 from clang::ObjCContainerDecl.

Definition at line 267 of file DeclObjC.cpp.

References all_referenced_protocols(), and clang::ObjCContainerDecl::properties().

Referenced by clang::Sema::DefaultSynthesizeProperties(), and clang::Sema::DiagnoseUnimplementedProperties().

ObjCInterfaceDecl * ObjCInterfaceDecl::Create ( const ASTContext C,
DeclContext DC,
SourceLocation  atLoc,
IdentifierInfo Id,
ObjCInterfaceDecl PrevDecl,
SourceLocation  ClassLoc = SourceLocation(),
bool  isInternal = false 
) [static]

Definition at line 1158 of file DeclObjC.cpp.

References AttributeLangSupport::C, and clang::ASTContext::getLangOpts().

Returns true if this interface decl declares a designated initializer or it inherites one from its super class.

Definition at line 801 of file DeclObjC.h.

References hasDesignatedInitializers().

FindCategoryDeclaration - Finds category declaration in the list of categories for this class and returns it. Name of the category is passed in 'CategoryId'. If category not found, return 0;

Definition at line 1346 of file DeclObjC.cpp.

References hasDefinition(), and visible_categories().

Referenced by clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::ObjCImplDecl::setClassInterface(), and clang::ASTNodeImporter::VisitObjCCategoryDecl().

FindPropertyVisibleInPrimaryClass - Finds declaration of the property with name 'PropertyId' in the primary class; including those in protocols (direct or indirect) used by the primary class.

Definition at line 246 of file DeclObjC.cpp.

References all_referenced_protocols(), clang::ObjCPropertyDecl::findPropertyDecl(), hasDefinition(), and P.

Referenced by clang::Sema::HandlePropertyInClassExtension().

Retrieves the canonical declaration of this Objective-C class.

Reimplemented from clang::Decl.

Definition at line 1358 of file DeclObjC.h.

References clang::Redeclarable< ObjCInterfaceDecl >::getFirstDecl().

Referenced by clang::ASTNodeImporter::VisitObjCImplementationDecl(), and clang::ASTDeclReader::VisitObjCInterfaceDecl().

Reimplemented from clang::Decl.

Definition at line 1359 of file DeclObjC.h.

References clang::Redeclarable< ObjCInterfaceDecl >::getFirstDecl().

Definition at line 1372 of file DeclObjC.cpp.

References visible_categories().

Referenced by clang::Sema::ActOnClassPropertyRefExpr(), and lookupPrivateMethod().

Definition at line 1362 of file DeclObjC.cpp.

References visible_categories().

Referenced by lookupPrivateMethod().

Retrieve the raw pointer to the start of the category/extension list.

Definition at line 1231 of file DeclObjC.h.

References hasDefinition().

Referenced by clang::ObjCCategoryDecl::Create(), known_categories_begin(), known_extensions_begin(), visible_categories_begin(), visible_extensions_begin(), and clang::ASTDeclWriter::VisitObjCInterfaceDecl().

ObjCMethodDecl* clang::ObjCInterfaceDecl::getCategoryMethod ( Selector  Sel,
bool  isInstance 
) const [inline]

Retrieve the definition of this class, or NULL if this class has been forward-declared (with @class) but not yet defined (with @interface).

Definition at line 1017 of file DeclObjC.h.

References hasDefinition().

void ObjCInterfaceDecl::getDesignatedInitializers ( llvm::SmallVectorImpl< const ObjCMethodDecl * > &  Methods) const

Returns the designated initializers for the interface.

If this declaration does not have methods marked as designated initializers then the interface inherits the designated initializers of its super class.

Definition at line 409 of file DeclObjC.cpp.

References clang::ObjCContainerDecl::instance_methods(), isThisDeclarationADefinition(), and visible_extensions().

Referenced by clang::Sema::DiagnoseMissingDesignatedInitOverrides().

Produce a name to be used for class's metadata. It comes either via objc_runtime_name attribute or class name.

Definition at line 1218 of file DeclObjC.cpp.

References clang::NamedDecl::getName().

Definition at line 805 of file DeclObjC.h.

References hasDefinition().

Referenced by rewriteToObjCInterfaceDecl().

SourceRange clang::ObjCInterfaceDecl::getSourceRange ( ) const [inline, override, virtual]

Source range that this declaration covers.

Reimplemented from clang::ObjCContainerDecl.

Definition at line 779 of file DeclObjC.h.

References clang::ObjCContainerDecl::getAtStartLoc(), clang::Decl::getLocation(), and isThisDeclarationADefinition().

Definition at line 1025 of file DeclObjC.h.

References hasDefinition().

Referenced by clang::Sema::ActOnClassPropertyRefExpr(), clang::Sema::ActOnProperty(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnSuperMessage(), AddObjCMethods(), AddSuperSendCompletion(), clang::ASTContext::areCommonBaseCompatible(), clang::ObjCMethodCall::canBeOverridenInSubclass(), clang::Sema::CheckCategoryVsClassMethodMatches(), checkObjCDealloc(), CheckObjCInstMethSignature(), CheckProtocolMethodDefs(), ClassImplementsProtocol(), clang::Sema::CodeCompleteObjCImplementationCategory(), clang::Sema::CodeCompleteObjCPropertySynthesizeIvar(), clang::Sema::CodeCompleteObjCSuperMessage(), clang::ASTContext::CollectInheritedProtocols(), CollectOverriddenMethodsRecurse(), CollectSuperClassPropertyImplementations(), clang::ASTContext::DeepCollectObjCIvars(), DiagnoseDirectIsaAccess(), clang::Sema::DiagnoseMissingDesignatedInitOverrides(), DiagnosePropertyMismatchDeclInProtocols(), FindIvarInterface(), findKnownClass(), clang::ObjCContainerDecl::FindPropertyDeclaration(), findProtocolsWithExplicitImpls(), GetAssumedMessageSendExprType(), hasObjCExceptionAttribute(), clang::ObjCContainerDecl::HasUserDeclaredSetterMethod(), clang::ASTNodeImporter::ImportDefinition(), InheritsFromClassNamed(), isArcWeakrefUnavailable(), clang::ento::cocoa::isCocoaObjectRef(), isObjCRequiresPropertyDefs(), isSubclass(), isSuperClassOf(), lookupInheritedClass(), lookupInstanceVariable(), lookupMethod(), lookupNestedProtocol(), lookupPrivateMethod(), rewriteToObjCInterfaceDecl(), shouldRunOnFunctionOrMethod(), SuperClassImplementsProperty(), and clang::ASTDeclWriter::VisitObjCInterfaceDecl().

Definition at line 1362 of file DeclObjC.h.

Referenced by clang::ASTDeclWriter::VisitObjCInterfaceDecl().

Returns true if this interface decl contains at least one initializer marked with the 'objc_designated_initializer' attribute.

Definition at line 1207 of file DeclObjC.cpp.

References isThisDeclarationADefinition().

Referenced by declaresOrInheritsDesignatedInitializers(), and clang::Sema::DiagnoseMissingDesignatedInitOverrides().

isArcWeakrefUnavailable - Checks for a class or one of its super classes to be incompatible with __weak references. Returns true if it is.

Definition at line 280 of file DeclObjC.cpp.

References getSuperClass(), and clang::Decl::hasAttr().

Referenced by clang::Sema::ActOnPropertyImplDecl(), and clang::arcmt::trans::canApplyWeak().

bool ObjCInterfaceDecl::isDesignatedInitializer ( Selector  Sel,
const ObjCMethodDecl **  InitMethod = nullptr 
) const

Returns true if the given selector is a designated initializer for the interface.

If this declaration does not have methods marked as designated initializers then the interface inherits the designated initializers of its super class.

Parameters:
InitMethodif non-null and the function returns true, it receives the method that was marked as a designated initializer.

Definition at line 431 of file DeclObjC.cpp.

References clang::ObjCContainerDecl::getInstanceMethod(), isThisDeclarationADefinition(), and visible_extensions().

isImplicitInterfaceDecl - check that this is an implicitly declared ObjCInterfaceDecl node. This is for legacy objective-c @implementation declaration without an @interface declaration.

Definition at line 1337 of file DeclObjC.h.

References hasDefinition(), and clang::Decl::isImplicit().

Referenced by clang::Sema::CheckImplementationIvars(), and clang::ASTNodeImporter::VisitObjCInterfaceDecl().

isObjCRequiresPropertyDefs - Checks that a class or one of its super classes must not be auto-synthesized. Returns class decl. if it must not be; 0, otherwise.

Definition at line 290 of file DeclObjC.cpp.

References getSuperClass(), and clang::Decl::hasAttr().

Referenced by clang::Sema::ActOnPropertyImplDecl().

isSuperClassOf - Return true if this class is the specified class or is a super class of the specified interface class.

Definition at line 1256 of file DeclObjC.h.

References clang::declaresSameEntity(), and getSuperClass().

Referenced by clang::ASTContext::canAssignObjCInterfaces(), clang::ASTContext::canAssignObjCInterfacesInBlockPointer(), clang::Sema::checkInitMethod(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), clang::Sema::IsSimplyAccessible(), and LookupMemberExpr().

Determine whether this particular declaration of this class is actually also a definition.

Definition at line 986 of file DeclObjC.h.

References getDefinition().

Referenced by getDesignatedInitializers(), getSourceRange(), hasDesignatedInitializers(), isDesignatedInitializer(), setHasDesignatedInitializers(), clang::ASTDeclWriter::VisitObjCInterfaceDecl(), and clang::ASTNodeImporter::VisitObjCInterfaceDecl().

Definition at line 936 of file DeclObjC.h.

References ivar_begin(), and ivar_end().

Referenced by all_declared_ivar_begin().

Definition at line 932 of file DeclObjC.h.

References ivar_begin(), and ivar_end().

Retrieve an iterator to the beginning of the known-categories list.

Definition at line 1145 of file DeclObjC.h.

References getCategoryListRaw().

Referenced by known_categories(), and known_categories_empty().

Determine whether the known-categories list is empty.

Definition at line 1155 of file DeclObjC.h.

References known_categories_begin(), and known_categories_end().

Retrieve an iterator to the end of the known-categories list.

Definition at line 1150 of file DeclObjC.h.

Referenced by known_categories(), and known_categories_empty().

Retrieve an iterator to the beginning of the known-extensions list.

Definition at line 1215 of file DeclObjC.h.

References getCategoryListRaw().

Referenced by known_extensions(), and known_extensions_empty().

Determine whether the known-extensions list is empty.

Definition at line 1225 of file DeclObjC.h.

References known_extensions_begin(), and known_extensions_end().

Retrieve an iterator to the end of the known-extensions list.

Definition at line 1220 of file DeclObjC.h.

Referenced by known_extensions(), and known_extensions_empty().

Lookup a class method for a given selector.

Definition at line 1298 of file DeclObjC.h.

References lookupMethod().

Referenced by clang::Sema::ActOnClassPropertyRefExpr(), clang::Sema::BuildClassMessage(), getNSNumberFactoryMethod(), and LookupMemberExpr().

lookupInheritedClass - This method returns ObjCInterfaceDecl * of the super class whose name is passed as argument. If it is not one of the super classes the it returns NULL.

Definition at line 513 of file DeclObjC.cpp.

References clang::NamedDecl::getIdentifier(), getSuperClass(), and hasDefinition().

Referenced by CheckProtocolMethodDefs().

Definition at line 1278 of file DeclObjC.h.

References lookupInstanceVariable().

ObjCMethodDecl * ObjCInterfaceDecl::lookupMethod ( Selector  Sel,
bool  isInstance,
bool  shallowCategoryLookup = false,
bool  followSuper = true,
const ObjCCategoryDecl C = nullptr 
) const
ObjCMethodDecl * ObjCInterfaceDecl::lookupPrivateMethod ( const Selector Sel,
bool  Instance = true 
) const

Lookup a setter or getter in the class hierarchy, including in all categories except for category passed as argument.

Definition at line 1314 of file DeclObjC.h.

References lookupMethod().

Referenced by DiagnoseUnimplementedAccessor().

mergeClassExtensionProtocolList - Merge class extension's protocol list into the protocol list for this class.

Definition at line 300 of file DeclObjC.cpp.

References all_referenced_protocols(), AttributeLangSupport::C, P, and clang::ASTContext::ProtocolCompatibleWithProtocol().

Referenced by clang::Sema::ActOnStartCategoryInterface().

Definition at line 859 of file DeclObjC.h.

References hasDefinition().

Referenced by clang::ASTNodeImporter::ImportDefinition(), and protocol_locs().

Definition at line 870 of file DeclObjC.h.

References hasDefinition().

Referenced by protocol_locs(), and rewriteToObjCInterfaceDecl().

Definition at line 856 of file DeclObjC.h.

References protocol_loc_begin(), and protocol_loc_end().

Referenced by clang::ASTDeclWriter::VisitObjCInterfaceDecl().

Set the raw pointer to the start of the category/extension list.

Definition at line 1244 of file DeclObjC.h.

Referenced by clang::ObjCCategoryDecl::Create().

Indicate that this Objective-C class is complete, but that the external AST source will be responsible for filling in its contents when a complete class is required.

Definition at line 1192 of file DeclObjC.cpp.

References clang::Decl::getASTContext(), and hasDefinition().

Indicate that this interface decl contains at least one initializer marked with the 'objc_designated_initializer' attribute.

Definition at line 1200 of file DeclObjC.cpp.

References isThisDeclarationADefinition().

Referenced by handleObjCDesignatedInitializer().

void clang::ObjCInterfaceDecl::setProtocolList ( ObjCProtocolDecl *const *  List,
unsigned  Num,
const SourceLocation Locs,
ASTContext C 
) [inline]

setProtocolList - Set the list of protocols that this interface implements.

Definition at line 948 of file DeclObjC.h.

Referenced by clang::Sema::ActOnStartClassInterface(), clang::ASTNodeImporter::ImportDefinition(), and clang::ASTDeclReader::VisitObjCInterfaceDecl().

void clang::ObjCInterfaceDecl::setTypeForDecl ( const Type TD) const [inline]

Definition at line 1363 of file DeclObjC.h.

Starts the definition of this Objective-C class, taking it from a forward declaration (@class) to a definition (@interface).

Definition at line 472 of file DeclObjC.cpp.

References clang::Redeclarable< ObjCInterfaceDecl >::redecls().

Referenced by clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), and clang::ASTNodeImporter::ImportDefinition().

Retrieve an iterator to the beginning of the visible-categories list.

Definition at line 1111 of file DeclObjC.h.

References getCategoryListRaw().

Referenced by visible_categories(), and visible_categories_empty().

Determine whether the visible-categories list is empty.

Definition at line 1121 of file DeclObjC.h.

References visible_categories_begin(), and visible_categories_end().

Retrieve an iterator to the end of the visible-categories list.

Definition at line 1116 of file DeclObjC.h.

Referenced by visible_categories(), and visible_categories_empty().

Retrieve an iterator to the beginning of the visible-extensions list.

Definition at line 1181 of file DeclObjC.h.

References getCategoryListRaw().

Referenced by visible_extensions(), and visible_extensions_empty().

Determine whether the visible-extensions list is empty.

Definition at line 1191 of file DeclObjC.h.

References visible_extensions_begin(), and visible_extensions_end().

Retrieve an iterator to the end of the visible-extensions list.

Definition at line 1186 of file DeclObjC.h.

Referenced by visible_extensions(), and visible_extensions_empty().


Friends And Related Function Documentation

friend class ASTContext [friend]

Definition at line 671 of file DeclObjC.h.

friend class ASTDeclReader [friend]

Reimplemented from clang::Redeclarable< ObjCInterfaceDecl >.

Definition at line 1369 of file DeclObjC.h.

friend class ASTDeclWriter [friend]

Reimplemented from clang::Redeclarable< ObjCInterfaceDecl >.

Definition at line 1370 of file DeclObjC.h.

friend class ASTReader [friend]

Reimplemented from clang::Decl.

Definition at line 1368 of file DeclObjC.h.


The documentation for this class was generated from the following files: