clang  3.7.0
Functions
SemaObjCProperty.cpp File Reference
#include "clang/Sema/SemaInternal.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Initialization.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallString.h"
Include dependency graph for SemaObjCProperty.cpp:

Go to the source code of this file.

Functions

static Qualifiers::ObjCLifetime getImpliedARCOwnership (ObjCPropertyDecl::PropertyAttributeKind attrs, QualType type)
 
static void checkARCPropertyDecl (Sema &S, ObjCPropertyDecl *property)
 Check the internal consistency of a property declaration. More...
 
static void CheckPropertyAgainstProtocol (Sema &S, ObjCPropertyDecl *Prop, ObjCProtocolDecl *Proto, llvm::SmallPtrSetImpl< ObjCProtocolDecl * > &Known)
 Check this Objective-C property against a property declared in the given protocol. More...
 
static
ObjCPropertyDecl::PropertyAttributeKind 
makePropertyAttributesAsWritten (unsigned Attributes)
 
static bool LocPropertyAttribute (ASTContext &Context, const char *attrName, SourceLocation LParenLoc, SourceLocation &Loc)
 
static unsigned getOwnershipRule (unsigned attr)
 
static void checkARCPropertyImpl (Sema &S, SourceLocation propertyImplLoc, ObjCPropertyDecl *property, ObjCIvarDecl *ivar)
 
static void setImpliedPropertyAttributeForReadOnlyProperty (ObjCPropertyDecl *property, ObjCIvarDecl *ivar)
 
static void DiagnosePropertyMismatchDeclInProtocols (Sema &S, SourceLocation AtLoc, ObjCInterfaceDecl *ClassDecl, ObjCPropertyDecl *Property)
 
static void CollectImmediateProperties (ObjCContainerDecl *CDecl, ObjCContainerDecl::PropertyMap &PropMap, ObjCContainerDecl::PropertyMap &SuperPropMap, bool IncludeProtocols=true)
 
static void CollectSuperClassPropertyImplementations (ObjCInterfaceDecl *CDecl, ObjCInterfaceDecl::PropertyMap &PropMap)
 
static bool SuperClassImplementsProperty (ObjCInterfaceDecl *IDecl, ObjCPropertyDecl *Prop)
 
static void DiagnoseUnimplementedAccessor (Sema &S, ObjCInterfaceDecl *PrimaryClass, Selector Method, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, ObjCCategoryDecl *C, ObjCPropertyDecl *Prop, Sema::SelectorSet &SMap)
 
static void AddPropertyAttrs (Sema &S, ObjCMethodDecl *PropertyMethod, ObjCPropertyDecl *Property)
 

Function Documentation

static void AddPropertyAttrs ( Sema S,
ObjCMethodDecl PropertyMethod,
ObjCPropertyDecl Property 
)
static

AddPropertyAttrs - Propagates attributes from a property to the implicitly-declared getter or setter for that property.

Definition at line 1963 of file SemaObjCProperty.cpp.

References clang::Decl::addAttr(), clang::Decl::attrs(), and clang::Sema::Context.

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

static void checkARCPropertyDecl ( Sema S,
ObjCPropertyDecl property 
)
static
static void checkARCPropertyImpl ( Sema S,
SourceLocation  propertyImplLoc,
ObjCPropertyDecl property,
ObjCIvarDecl ivar 
)
static
static void CheckPropertyAgainstProtocol ( Sema S,
ObjCPropertyDecl Prop,
ObjCProtocolDecl Proto,
llvm::SmallPtrSetImpl< ObjCProtocolDecl * > &  Known 
)
static
static void CollectImmediateProperties ( ObjCContainerDecl CDecl,
ObjCContainerDecl::PropertyMap PropMap,
ObjCContainerDecl::PropertyMap SuperPropMap,
bool  IncludeProtocols = true 
)
static

CollectImmediateProperties - This routine collects all properties in the class and its conforming protocols; but not those in its super class.

Definition at line 1433 of file SemaObjCProperty.cpp.

References clang::NamedDecl::getIdentifier().

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

static void CollectSuperClassPropertyImplementations ( ObjCInterfaceDecl CDecl,
ObjCInterfaceDecl::PropertyMap &  PropMap 
)
static

CollectSuperClassPropertyImplementations - This routine collects list of properties to be implemented in super class(s) and also coming from their conforming protocols.

Definition at line 1478 of file SemaObjCProperty.cpp.

References clang::ObjCInterfaceDecl::getSuperClass().

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

static void DiagnosePropertyMismatchDeclInProtocols ( Sema S,
SourceLocation  AtLoc,
ObjCInterfaceDecl ClassDecl,
ObjCPropertyDecl Property 
)
static
static void DiagnoseUnimplementedAccessor ( Sema S,
ObjCInterfaceDecl PrimaryClass,
Selector  Method,
ObjCImplDecl IMPDecl,
ObjCContainerDecl CDecl,
ObjCCategoryDecl C,
ObjCPropertyDecl Prop,
Sema::SelectorSet SMap 
)
static
static Qualifiers::ObjCLifetime getImpliedARCOwnership ( ObjCPropertyDecl::PropertyAttributeKind  attrs,
QualType  type 
)
static
static unsigned getOwnershipRule ( unsigned  attr)
static
static bool LocPropertyAttribute ( ASTContext Context,
const char *  attrName,
SourceLocation  LParenLoc,
SourceLocation Loc 
)
static
static ObjCPropertyDecl::PropertyAttributeKind makePropertyAttributesAsWritten ( unsigned  Attributes)
static
static void setImpliedPropertyAttributeForReadOnlyProperty ( ObjCPropertyDecl property,
ObjCIvarDecl ivar 
)
static

setImpliedPropertyAttributeForReadOnlyProperty - This routine evaludates life-time attributes for a 'readonly' property with no known lifetime of its own, using backing 'ivar's attribute, if any. If no backing 'ivar', property's life-time is assumed 'strong'.

Definition at line 728 of file SemaObjCProperty.cpp.

References getImpliedARCOwnership(), clang::QualType::getObjCLifetime(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ValueDecl::getType(), clang::ObjCPropertyDecl::OBJC_PR_strong, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.

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

static bool SuperClassImplementsProperty ( ObjCInterfaceDecl IDecl,
ObjCPropertyDecl Prop 
)
static