clang API Documentation
Represents one property declaration in an Objective-C interface. More...
#include <DeclObjC.h>
Represents one property declaration in an Objective-C interface.
For example:
{.mm} \@property (assign, readwrite) int MyProperty;
Definition at line 2186 of file DeclObjC.h.
anonymous enum |
Definition at line 2206 of file DeclObjC.h.
Definition at line 2189 of file DeclObjC.h.
Definition at line 2212 of file DeclObjC.h.
Definition at line 2211 of file DeclObjC.h.
static bool clang::ObjCPropertyDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::NamedDecl.
Definition at line 2359 of file DeclObjC.h.
References classofKind(), and clang::Decl::getKind().
static bool clang::ObjCPropertyDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::NamedDecl.
Definition at line 2360 of file DeclObjC.h.
Referenced by classof().
ObjCPropertyDecl * ObjCPropertyDecl::Create | ( | ASTContext & | C, |
DeclContext * | DC, | ||
SourceLocation | L, | ||
IdentifierInfo * | Id, | ||
SourceLocation | AtLocation, | ||
SourceLocation | LParenLocation, | ||
TypeSourceInfo * | T, | ||
PropertyControl | propControl = None |
||
) | [static] |
Definition at line 1856 of file DeclObjC.cpp.
References AttributeLangSupport::C.
Referenced by clang::Sema::CreatePropertyDecl(), clang::Sema::HandlePropertyInClassExtension(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
ObjCPropertyDecl * ObjCPropertyDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
Definition at line 1866 of file DeclObjC.cpp.
References AttributeLangSupport::C.
ObjCPropertyDecl * ObjCPropertyDecl::findPropertyDecl | ( | const DeclContext * | DC, |
IdentifierInfo * | propertyID | ||
) | [static] |
Lookup a property by name in the specified DeclContext.
Definition at line 153 of file DeclObjC.cpp.
References clang::ObjCProtocolDecl::getDefinition(), and clang::DeclContext::lookup().
Referenced by clang::CodeCompletionResult::CreateCodeCompletionString(), clang::Sema::CreatePropertyDecl(), DiagnoseAvailabilityOfDecl(), clang::ObjCMethodDecl::findPropertyDecl(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass(), clang::Sema::HandleExprPropertyRefExpr(), clang::Sema::HandlePropertyInClassExtension(), and clang::sema::FunctionScopeInfo::markSafeWeakUse().
SourceLocation clang::ObjCPropertyDecl::getAtLoc | ( | ) | const [inline] |
Definition at line 2252 of file DeclObjC.h.
Referenced by checkAllProps(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
IdentifierInfo * ObjCPropertyDecl::getDefaultSynthIvarName | ( | ASTContext & | Ctx | ) | const |
Get the default name of the synthesized ivar.
Definition at line 173 of file DeclObjC.cpp.
References clang::IdentifierTable::get(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), and clang::ASTContext::Idents.
Referenced by clang::Sema::DefaultSynthesizeProperties().
ObjCMethodDecl* clang::ObjCPropertyDecl::getGetterMethodDecl | ( | ) | const [inline] |
Definition at line 2327 of file DeclObjC.h.
Referenced by AddObjCKeyValueCompletions(), createObjCPropertyGetter(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), clang::CodeGen::CodeGenFunction::GenerateObjCGetter(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::ObjCPropertyRefExpr::getGetterResultType(), clang::Sema::HandlePropertyInClassExtension(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
Selector clang::ObjCPropertyDecl::getGetterName | ( | ) | const [inline] |
Definition at line 2321 of file DeclObjC.h.
Referenced by clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), clang::Sema::DiagnosePropertyMismatch(), clang::Sema::DiagnoseUnimplementedProperties(), clang::ObjCPropertyRefExpr::getGetterSelector(), clang::ASTContext::getObjCEncodingForPropertyDecl(), clang::Sema::HandlePropertyInClassExtension(), clang::Sema::ProcessPropertyDecl(), SuperClassImplementsProperty(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
SourceLocation clang::ObjCPropertyDecl::getLParenLoc | ( | ) | const [inline] |
Definition at line 2255 of file DeclObjC.h.
Referenced by clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
PropertyAttributeKind clang::ObjCPropertyDecl::getPropertyAttributes | ( | ) | const [inline] |
Definition at line 2262 of file DeclObjC.h.
Referenced by checkARCPropertyImpl(), clang::Sema::checkUnsafeExprAssigns(), createObjCPropertyGetter(), clang::Sema::DefaultSynthesizeProperties(), DiagnoseARCUseOfWeakReceiver(), clang::Sema::DiagnosePropertyMismatch(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::ASTContext::getObjCEncodingForPropertyDecl(), setImpliedPropertyAttributeForReadOnlyProperty(), SuperClassImplementsProperty(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
PropertyAttributeKind clang::ObjCPropertyDecl::getPropertyAttributesAsWritten | ( | ) | const [inline] |
Definition at line 2269 of file DeclObjC.h.
Referenced by checkAllAtProps(), checkAllProps(), clang::Sema::checkUnsafeExprAssigns(), clang::Sema::HandlePropertyInClassExtension(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
PropertyControl clang::ObjCPropertyDecl::getPropertyImplementation | ( | ) | const [inline] |
Definition at line 2337 of file DeclObjC.h.
Referenced by clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DiagnoseUnimplementedProperties(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
ObjCIvarDecl* clang::ObjCPropertyDecl::getPropertyIvarDecl | ( | ) | const [inline] |
Definition at line 2344 of file DeclObjC.h.
Referenced by createObjCPropertyGetter(), clang::Sema::GetIvarBackingPropertyAccessor(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
SetterKind clang::ObjCPropertyDecl::getSetterKind | ( | ) | const [inline] |
getSetterKind - Return the method used for doing assignment in the property setter. This is only valid if the property has been defined to have a setter.
Definition at line 2309 of file DeclObjC.h.
References Assign, Copy, getType(), clang::Type::isBlockPointerType(), OBJC_PR_copy, OBJC_PR_retain, OBJC_PR_strong, OBJC_PR_weak, Retain, and Weak.
Referenced by checkObjCDealloc(), clang::ASTContext::getObjCEncodingForPropertyDecl(), and scan_ivar_release().
ObjCMethodDecl* clang::ObjCPropertyDecl::getSetterMethodDecl | ( | ) | const [inline] |
Definition at line 2330 of file DeclObjC.h.
Referenced by AddObjCKeyValueCompletions(), clang::CodeGen::CodeGenFunction::GenerateObjCSetter(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::Sema::HandlePropertyInClassExtension(), scan_ivar_release(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
Selector clang::ObjCPropertyDecl::getSetterName | ( | ) | const [inline] |
Definition at line 2324 of file DeclObjC.h.
Referenced by clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DiagnosePropertyMismatch(), clang::ASTContext::getObjCEncodingForPropertyDecl(), clang::ObjCPropertyRefExpr::getSetterSelector(), clang::Sema::HandlePropertyInClassExtension(), clang::ObjCContainerDecl::HasUserDeclaredSetterMethod(), clang::Sema::ProcessPropertyDecl(), SuperClassImplementsProperty(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
SourceRange clang::ObjCPropertyDecl::getSourceRange | ( | ) | const [inline, override, virtual] |
Source range that this declaration covers.
Reimplemented from clang::Decl.
Definition at line 2348 of file DeclObjC.h.
References clang::Decl::getLocation().
QualType clang::ObjCPropertyDecl::getType | ( | ) | const [inline] |
Definition at line 2259 of file DeclObjC.h.
References clang::TypeSourceInfo::getType().
Referenced by AddObjCKeyValueCompletions(), checkARCPropertyDecl(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::checkUnsafeExprAssigns(), createObjCPropertyGetter(), DiagnoseARCUseOfWeakReceiver(), clang::Sema::DiagnosePropertyMismatch(), DiagnosePropertyMismatchDeclInProtocols(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::ObjCPropertyRefExpr::getGetterResultType(), clang::ASTContext::getObjCEncodingForPropertyDecl(), getSetterKind(), clang::Sema::HandlePropertyInClassExtension(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
TypeSourceInfo* clang::ObjCPropertyDecl::getTypeSourceInfo | ( | ) | const [inline] |
Definition at line 2258 of file DeclObjC.h.
Referenced by checkAllAtProps(), clang::ASTDeclWriter::VisitObjCPropertyDecl(), and clang::ASTNodeImporter::VisitObjCPropertyDecl().
bool clang::ObjCPropertyDecl::hasWrittenStorageAttribute | ( | ) | const [inline] |
Definition at line 2273 of file DeclObjC.h.
References OBJC_PR_assign, OBJC_PR_copy, OBJC_PR_retain, OBJC_PR_strong, OBJC_PR_unsafe_unretained, and OBJC_PR_weak.
bool clang::ObjCPropertyDecl::isAtomic | ( | ) | const [inline] |
isAtomic - Return true if the property is atomic.
Definition at line 2296 of file DeclObjC.h.
References OBJC_PR_atomic.
bool clang::ObjCPropertyDecl::isReadOnly | ( | ) | const [inline] |
isReadOnly - Return true iff the property has a setter.
Definition at line 2291 of file DeclObjC.h.
References OBJC_PR_readonly.
Referenced by checkObjCDealloc(), clang::ASTContext::getObjCEncodingForPropertyDecl(), and clang::Sema::ProcessPropertyDecl().
bool clang::ObjCPropertyDecl::isRetaining | ( | ) | const [inline] |
isRetaining - Return true if the property retains its value.
Definition at line 2301 of file DeclObjC.h.
References OBJC_PR_copy, OBJC_PR_retain, and OBJC_PR_strong.
void clang::ObjCPropertyDecl::makeitReadWriteAttribute | ( | ) | [inline] |
Definition at line 2283 of file DeclObjC.h.
References OBJC_PR_readonly, and OBJC_PR_readwrite.
Referenced by clang::Sema::HandlePropertyInClassExtension().
void clang::ObjCPropertyDecl::setAtLoc | ( | SourceLocation | L | ) | [inline] |
Definition at line 2253 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setGetterMethodDecl | ( | ObjCMethodDecl * | gDecl | ) | [inline] |
Definition at line 2328 of file DeclObjC.h.
Referenced by clang::Sema::HandlePropertyInClassExtension(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), and clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setGetterName | ( | Selector | Sel | ) | [inline] |
Definition at line 2322 of file DeclObjC.h.
Referenced by clang::Sema::HandlePropertyInClassExtension(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), and clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setLParenLoc | ( | SourceLocation | L | ) | [inline] |
Definition at line 2256 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setPropertyAttributes | ( | PropertyAttributeKind | PRVal | ) | [inline] |
Definition at line 2265 of file DeclObjC.h.
Referenced by clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::HandlePropertyInClassExtension(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), and clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setPropertyAttributesAsWritten | ( | PropertyAttributeKind | PRVal | ) | [inline] |
Definition at line 2279 of file DeclObjC.h.
Referenced by clang::Sema::HandlePropertyInClassExtension(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), and clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setPropertyImplementation | ( | PropertyControl | pc | ) | [inline] |
Definition at line 2334 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setPropertyIvarDecl | ( | ObjCIvarDecl * | Ivar | ) | [inline] |
Definition at line 2341 of file DeclObjC.h.
Referenced by clang::ASTNodeImporter::VisitObjCPropertyDecl(), and clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setSetterMethodDecl | ( | ObjCMethodDecl * | gDecl | ) | [inline] |
Definition at line 2331 of file DeclObjC.h.
Referenced by clang::Sema::HandlePropertyInClassExtension(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), and clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setSetterName | ( | Selector | Sel | ) | [inline] |
Definition at line 2325 of file DeclObjC.h.
Referenced by clang::Sema::HandlePropertyInClassExtension(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), and clang::ASTDeclReader::VisitObjCPropertyDecl().
void clang::ObjCPropertyDecl::setType | ( | TypeSourceInfo * | T | ) | [inline] |
Definition at line 2260 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCPropertyDecl().