clang 20.0.0git
|
#include "clang/Sema/SemaObjC.h"
Classes | |
class | GlobalMethodPool |
struct | ObjCArgInfo |
Public Types | |
enum | ObjCSubscriptKind { OS_Array , OS_Dictionary , OS_Error } |
Public Member Functions | |
SemaObjC (Sema &S) | |
ExprResult | CheckObjCForCollectionOperand (SourceLocation forLoc, Expr *collection) |
StmtResult | ActOnObjCForCollectionStmt (SourceLocation ForColLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc) |
StmtResult | FinishObjCForCollectionStmt (Stmt *ForCollection, Stmt *Body) |
FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement. | |
StmtResult | ActOnObjCAtCatchStmt (SourceLocation AtLoc, SourceLocation RParen, Decl *Parm, Stmt *Body) |
StmtResult | ActOnObjCAtFinallyStmt (SourceLocation AtLoc, Stmt *Body) |
StmtResult | ActOnObjCAtTryStmt (SourceLocation AtLoc, Stmt *Try, MultiStmtArg Catch, Stmt *Finally) |
StmtResult | BuildObjCAtThrowStmt (SourceLocation AtLoc, Expr *Throw) |
StmtResult | ActOnObjCAtThrowStmt (SourceLocation AtLoc, Expr *Throw, Scope *CurScope) |
ExprResult | ActOnObjCAtSynchronizedOperand (SourceLocation atLoc, Expr *operand) |
StmtResult | ActOnObjCAtSynchronizedStmt (SourceLocation AtLoc, Expr *SynchExpr, Stmt *SynchBody) |
StmtResult | ActOnObjCAutoreleasePoolStmt (SourceLocation AtLoc, Stmt *Body) |
TypeResult | actOnObjCProtocolQualifierType (SourceLocation lAngleLoc, ArrayRef< Decl * > protocols, ArrayRef< SourceLocation > protocolLocs, SourceLocation rAngleLoc) |
Build a an Objective-C protocol-qualified 'id' type where no base type was specified. | |
TypeResult | actOnObjCTypeArgsAndProtocolQualifiers (Scope *S, SourceLocation Loc, ParsedType BaseType, SourceLocation TypeArgsLAngleLoc, ArrayRef< ParsedType > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< Decl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc) |
Build a specialized and/or protocol-qualified Objective-C type. | |
QualType | BuildObjCTypeParamType (const ObjCTypeParamDecl *Decl, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false) |
Build an Objective-C type parameter type. | |
QualType | BuildObjCObjectType (QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo * > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError, bool Rebuilding) |
Build an Objective-C object pointer type. | |
ParsedType | ActOnObjCInstanceType (SourceLocation Loc) |
The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration. | |
void | checkRetainCycles (ObjCMessageExpr *msg) |
checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle. | |
void | checkRetainCycles (Expr *receiver, Expr *argument) |
Check a property assign to see if it's likely to cause a retain cycle. | |
void | checkRetainCycles (VarDecl *Var, Expr *Init) |
bool | CheckObjCString (Expr *Arg) |
CheckObjCString - Checks that the argument to the builtin CFString constructor is correct Note: It might also make sense to do the UTF-16 conversion here (would simplify the backend). | |
bool | CheckObjCMethodCall (ObjCMethodDecl *Method, SourceLocation loc, ArrayRef< const Expr * > Args) |
void | CheckObjCCircularContainer (ObjCMessageExpr *Message) |
Check whether receiver is mutable ObjC container which attempts to add itself into the container. | |
void | ActOnObjCContainerStartDefinition (ObjCContainerDecl *IDecl) |
void | ActOnObjCContainerFinishDefinition () |
void | ActOnObjCTemporaryExitContainerContext (ObjCContainerDecl *ObjCCtx) |
Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs. | |
void | ActOnObjCReenterContainerContext (ObjCContainerDecl *ObjCCtx) |
const DeclContext * | getCurObjCLexicalContext () const |
ObjCProtocolDecl * | LookupProtocol (IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=RedeclarationKind::NotForRedeclaration) |
Find the protocol with the given name, if any. | |
bool | isObjCWritebackConversion (QualType FromType, QualType ToType, QualType &ConvertedType) |
Determine whether this is an Objective-C writeback conversion, used for parameter passing when performing automatic reference counting. | |
ObjCSubscriptKind | CheckSubscriptingKind (Expr *FromE) |
CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being done. | |
void | AddCFAuditedAttribute (Decl *D) |
AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and, if so, consider adding the appropriate attribute. | |
bool | isCFError (RecordDecl *D) |
IdentifierInfo * | getNSErrorIdent () |
Retrieve the identifier "NSError". | |
bool | GetFormatNSStringIdx (const FormatAttr *Format, unsigned &Idx) |
void | DiagnoseCStringFormatDirectiveInCFAPI (const NamedDecl *FDecl, Expr **Args, unsigned NumArgs) |
Diagnose use of s directive in an NSString which is being passed as formatting string to formatting method. | |
bool | isSignedCharBool (QualType Ty) |
void | adornBoolConversionDiagWithTernaryFixit (Expr *SourceExpr, const Sema::SemaDiagnosticBuilder &Builder) |
void | checkDictionaryLiteral (QualType TargetType, ObjCDictionaryLiteral *DictionaryLiteral) |
Check an Objective-C dictionary literal being converted to the given target type. | |
void | checkArrayLiteral (QualType TargetType, ObjCArrayLiteral *ArrayLiteral) |
Check an Objective-C array literal being converted to the given target type. | |
ObjC @property and @synthesize | |
Implementations are in SemaObjCProperty.cpp | |
void | CheckObjCPropertyAttributes (Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) |
Ensure attributes are consistent with type. | |
void | ProcessPropertyDecl (ObjCPropertyDecl *property) |
Process the specified property declaration and create decls for the setters and getters as needed. | |
Decl * | ActOnProperty (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr) |
Decl * | ActOnPropertyImplDecl (Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool ImplKind, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) |
ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property implementation declaration; declared as @synthesize or @dynamic. | |
ObjCPropertyDecl * | HandlePropertyInClassExtension (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) |
Called by ActOnProperty to handle @property declarations in class extensions. | |
ObjCPropertyDecl * | CreatePropertyDecl (Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr) |
Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl for a category or @interface. | |
void | DiagnosePropertyMismatch (ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty) |
DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a variety of inconsistencies. | |
bool | DiagnosePropertyAccessorMismatch (ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc) |
void | DiagnoseUnimplementedProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties) |
DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by this implementation. | |
void | diagnoseNullResettableSynthesizedSetters (const ObjCImplDecl *impDecl) |
Diagnose any null-resettable synthesized setters. | |
void | DefaultSynthesizeProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd) |
DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesized in the class's @implementation. | |
void | DefaultSynthesizeProperties (Scope *S, Decl *D, SourceLocation AtEnd) |
bool | IvarBacksCurrentMethodAccessor (ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV) |
IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Method' and 'Method' is a property accessor declared in class 'IFace'. | |
void | DiagnoseOwningPropertyGetterSynthesis (const ObjCImplementationDecl *D) |
void | DiagnoseMissingDesignatedInitOverrides (const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD) |
void | AtomicPropertySetterGetterRules (ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl) |
AtomicPropertySetterGetterRules - This routine enforces the rule (via warning) when atomic property has one but not the other user-declared setter or getter. | |
ObjC Attributes | |
Implementations are in SemaObjC.cpp | |
bool | isNSStringType (QualType T, bool AllowNSAttributedString=false) |
bool | isCFStringType (QualType T) |
void | handleIBOutlet (Decl *D, const ParsedAttr &AL) |
void | handleIBOutletCollection (Decl *D, const ParsedAttr &AL) |
void | handleSuppresProtocolAttr (Decl *D, const ParsedAttr &AL) |
void | handleDirectAttr (Decl *D, const ParsedAttr &AL) |
void | handleDirectMembersAttr (Decl *D, const ParsedAttr &AL) |
void | handleMethodFamilyAttr (Decl *D, const ParsedAttr &AL) |
void | handleNSObject (Decl *D, const ParsedAttr &AL) |
void | handleIndependentClass (Decl *D, const ParsedAttr &AL) |
void | handleBlocksAttr (Decl *D, const ParsedAttr &AL) |
void | handleReturnsInnerPointerAttr (Decl *D, const ParsedAttr &Attrs) |
void | handleXReturnsXRetainedAttr (Decl *D, const ParsedAttr &AL) |
void | handleRequiresSuperAttr (Decl *D, const ParsedAttr &Attrs) |
void | handleNSErrorDomain (Decl *D, const ParsedAttr &Attr) |
void | handleBridgeAttr (Decl *D, const ParsedAttr &AL) |
void | handleBridgeMutableAttr (Decl *D, const ParsedAttr &AL) |
void | handleBridgeRelatedAttr (Decl *D, const ParsedAttr &AL) |
void | handleDesignatedInitializer (Decl *D, const ParsedAttr &AL) |
void | handleRuntimeName (Decl *D, const ParsedAttr &AL) |
void | handleBoxable (Decl *D, const ParsedAttr &AL) |
void | handleOwnershipAttr (Decl *D, const ParsedAttr &AL) |
void | handlePreciseLifetimeAttr (Decl *D, const ParsedAttr &AL) |
void | handleExternallyRetainedAttr (Decl *D, const ParsedAttr &AL) |
void | AddXConsumedAttr (Decl *D, const AttributeCommonInfo &CI, Sema::RetainOwnershipKind K, bool IsTemplateInstantiation) |
bool | isValidOSObjectOutParameter (const Decl *D) |
bool | checkNSReturnsRetainedReturnType (SourceLocation loc, QualType type) |
Sema::RetainOwnershipKind | parsedAttrToRetainOwnershipKind (const ParsedAttr &AL) |
Public Member Functions inherited from clang::SemaBase | |
SemaBase (Sema &S) | |
ASTContext & | getASTContext () const |
DiagnosticsEngine & | getDiagnostics () const |
const LangOptions & | getLangOpts () const |
SemaDiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID, bool DeferHint=false) |
Emit a diagnostic. | |
SemaDiagnosticBuilder | Diag (SourceLocation Loc, const PartialDiagnostic &PD, bool DeferHint=false) |
Emit a partial diagnostic. | |
PartialDiagnostic | PDiag (unsigned DiagID=0) |
Build a partial diagnostic. | |
Public Attributes | |
RecordDecl * | CFError = nullptr |
The struct behind the CFErrorRef pointer. | |
Public Attributes inherited from clang::SemaBase | |
Sema & | SemaRef |
ObjC Declarations | |
Implementations are in SemaDeclObjC.cpp | |
enum | ObjCSpecialMethodKind { OSMK_None , OSMK_Alloc , OSMK_New , OSMK_Copy , OSMK_RetainingInit , OSMK_NonRetainingInit } |
enum | MethodMatchStrategy { MMS_loose , MMS_strict } |
enum | ObjCContainerKind { OCK_None = -1 , OCK_Interface = 0 , OCK_Protocol , OCK_Category , OCK_ClassExtension , OCK_Implementation , OCK_CategoryImplementation } |
enum | ResultTypeCompatibilityKind { RTC_Compatible , RTC_Incompatible , RTC_Unknown } |
Describes the compatibility of a result type with its method. More... | |
typedef llvm::SmallPtrSet< Selector, 8 > | SelectorSet |
using | DeclGroupPtrTy = OpaquePtr< DeclGroupRef > |
llvm::MapVector< Selector, SourceLocation > | ReferencedSelectors |
Method selectors used in a @selector expression. | |
GlobalMethodPool | MethodPool |
Method Pool - allows efficient lookup when typechecking messages to "id". | |
ObjCContainerKind | getObjCContainerKind () const |
DeclResult | actOnObjCTypeParam (Scope *S, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, IdentifierInfo *paramName, SourceLocation paramLoc, SourceLocation colonLoc, ParsedType typeBound) |
ObjCTypeParamList * | actOnObjCTypeParamList (Scope *S, SourceLocation lAngleLoc, ArrayRef< Decl * > typeParams, SourceLocation rAngleLoc) |
void | popObjCTypeParamList (Scope *S, ObjCTypeParamList *typeParamList) |
ObjCInterfaceDecl * | ActOnStartClassInterface (Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody) |
void | ActOnSuperClassOfClassInterface (Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange) |
void | ActOnTypedefedProtocols (SmallVectorImpl< Decl * > &ProtocolRefs, SmallVectorImpl< SourceLocation > &ProtocolLocs, IdentifierInfo *SuperName, SourceLocation SuperLoc) |
ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualified super class and adds them to the list of the protocols. | |
Decl * | ActOnCompatibilityAlias (SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation) |
ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias declaration. | |
bool | CheckForwardProtocolDeclarationForCircularDependency (IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList) |
ObjCProtocolDecl * | ActOnStartProtocolInterface (SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody) |
ObjCCategoryDecl * | ActOnStartCategoryInterface (SourceLocation AtInterfaceLoc, const IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, const IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList) |
ObjCImplementationDecl * | ActOnStartClassImplementation (SourceLocation AtClassImplLoc, const IdentifierInfo *ClassName, SourceLocation ClassLoc, const IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &AttrList) |
ObjCCategoryImplDecl * | ActOnStartCategoryImplementation (SourceLocation AtCatImplLoc, const IdentifierInfo *ClassName, SourceLocation ClassLoc, const IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &AttrList) |
ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration and build an ObjCCategoryImplDecl object. | |
DeclGroupPtrTy | ActOnFinishObjCImplementation (Decl *ObjCImpDecl, ArrayRef< Decl * > Decls) |
DeclGroupPtrTy | ActOnForwardProtocolDeclaration (SourceLocation AtProtoclLoc, ArrayRef< IdentifierLocPair > IdentList, const ParsedAttributesView &attrList) |
ActOnForwardProtocolDeclaration - Handle @protocol foo;. | |
void | FindProtocolDeclaration (bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef< IdentifierLocPair > ProtocolId, SmallVectorImpl< Decl * > &Protocols) |
FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declared. | |
void | DiagnoseTypeArgsAndProtocols (IdentifierInfo *ProtocolId, SourceLocation ProtocolLoc, IdentifierInfo *TypeArgId, SourceLocation TypeArgLoc, bool SelectProtocolFirst=false) |
void | actOnObjCTypeArgsOrProtocolQualifiers (Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef< IdentifierInfo * > identifiers, ArrayRef< SourceLocation > identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl< ParsedType > &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl< Decl * > &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) |
Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol qualifiers or type arguments, as appropriate. | |
void | DiagnoseClassExtensionDupMethods (ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID) |
DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension. | |
Decl * | ActOnAtEnd (Scope *S, SourceRange AtEnd, ArrayRef< Decl * > allMethods=std::nullopt, ArrayRef< DeclGroupPtrTy > allTUVars=std::nullopt) |
Decl * | ActOnMethodDeclaration (Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, const ParsedAttributesView &AttrList, tok::ObjCKeywordKind MethodImplKind, bool isVariadic, bool MethodDefinition) |
bool | CheckARCMethodDecl (ObjCMethodDecl *method) |
Check a method declaration for compatibility with the Objective-C ARC conventions. | |
bool | checkInitMethod (ObjCMethodDecl *method, QualType receiverTypeIfCall) |
Check whether the given method, which must be in the 'init' family, is a valid member of that family. | |
void | CheckObjCMethodOverride (ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) |
Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited. | |
void | CheckObjCMethodDirectOverrides (ObjCMethodDecl *method, ObjCMethodDecl *overridden) |
void | CheckObjCMethodOverrides (ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC) |
void | AddAnyMethodToGlobalPool (Decl *D) |
AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool. | |
void | ActOnStartOfObjCMethodDef (Scope *S, Decl *D) |
ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST. | |
bool | isObjCMethodDecl (Decl *D) |
void | CheckImplementationIvars (ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc) |
CheckImplementationIvars - This routine checks if the instance variables listed in the implelementation match those listed in the interface. | |
void | WarnConflictingTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl) |
void | CheckConflictingOverridingMethod (ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl) |
void | WarnExactTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl) |
WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches exactly that of its declaration. | |
void | MatchAllMethodDeclarations (const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl=false) |
MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declared in their implementations. | |
void | CheckCategoryVsClassMethodMatches (ObjCCategoryImplDecl *CatIMP) |
CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those implemented in its primary class and warns each time an exact match is found. | |
void | ImplMethodsVsClassMethods (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool IncompleteImpl=false) |
ImplMethodsVsClassMethods - This is main routine to warn if any method remains unimplemented in the class or category @implementation. | |
DeclGroupPtrTy | ActOnForwardClassDeclaration (SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef< ObjCTypeParamList * > TypeParamLists, unsigned NumElts) |
bool | MatchTwoMethodDeclarations (const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict) |
MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false, accordingly. | |
void | addMethodToGlobalList (ObjCMethodList *List, ObjCMethodDecl *Method) |
Add the given method to the list of globally-known methods. | |
void | ReadMethodPool (Selector Sel) |
Read the contents of the method pool for a given selector from external storage. | |
void | updateOutOfDateSelector (Selector Sel) |
bool | CollectMultipleMethodsInGlobalPool (Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool InstanceFirst, bool CheckTheOther, const ObjCObjectType *TypeBound=nullptr) |
We first select the type of the method: Instance or Factory, then collect all methods with that type. | |
bool | AreMultipleMethodsInGlobalPool (Selector Sel, ObjCMethodDecl *BestMethod, SourceRange R, bool receiverIdOrClass, SmallVectorImpl< ObjCMethodDecl * > &Methods) |
void | DiagnoseMultipleMethodInGlobalPool (SmallVectorImpl< ObjCMethodDecl * > &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) |
const ObjCMethodDecl * | SelectorsForTypoCorrection (Selector Sel, QualType ObjectType=QualType()) |
ObjCMethodDecl * | LookupImplementedMethodInGlobalPool (Selector Sel) |
LookupImplementedMethodInGlobalPool - Returns the method which has an implementation. | |
void | DiagnoseDuplicateIvars (ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID) |
DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementation. | |
bool | CheckObjCDeclScope (Decl *D) |
Checks that the Objective-C declaration is declared in the global scope. | |
void | ActOnDefs (Scope *S, Decl *TagD, SourceLocation DeclStart, const IdentifierInfo *ClassName, SmallVectorImpl< Decl * > &Decls) |
Called whenever @defs(ClassName) is encountered in the source. | |
VarDecl * | BuildObjCExceptionDecl (TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, bool Invalid=false) |
Build a type-check a new Objective-C exception variable declaration. | |
Decl * | ActOnObjCExceptionDecl (Scope *S, Declarator &D) |
void | CollectIvarsToConstructOrDestruct (ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars) |
CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization. | |
void | DiagnoseUseOfUnimplementedSelectors () |
void | DiagnoseUnusedBackingIvarInAccessor (Scope *S, const ObjCImplementationDecl *ImplD) |
DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is not used in the property's accessor. | |
ObjCIvarDecl * | GetIvarBackingPropertyAccessor (const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const |
GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ivar, returns this ivar; otherwise, returns NULL. | |
void | AddInstanceMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false) |
AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool. | |
void | AddFactoryMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false) |
AddFactoryMethodToGlobalPool - Same as above, but for factory methods. | |
QualType | AdjustParameterTypeForObjCAutoRefCount (QualType T, SourceLocation NameLoc, TypeSourceInfo *TSInfo) |
ObjCInterfaceDecl * | getObjCInterfaceDecl (const IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false) |
Look for an Objective-C class in the translation unit. | |
bool | inferObjCARCLifetime (ValueDecl *decl) |
void | SetIvarInitializers (ObjCImplementationDecl *ObjCImplementation) |
SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whose ivars need be initialized. | |
Decl * | ActOnIvar (Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitWidth, tok::ObjCKeywordKind visibility) |
ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDecl object for it. | |
ObjCContainerDecl * | getObjCDeclContext () const |
ObjC Expressions | |
Implementations are in SemaExprObjC.cpp | |
enum | ObjCMessageKind { ObjCSuperMessage , ObjCInstanceMessage , ObjCClassMessage } |
Describes the kind of message expression indicated by a message send that starts with an identifier. More... | |
enum | ARCConversionResult { ACR_okay , ACR_unbridged , ACR_error } |
enum | ObjCLiteralKind { LK_Array , LK_Dictionary , LK_Numeric , LK_Boxed , LK_String , LK_Block , LK_None } |
std::unique_ptr< NSAPI > | NSAPIObj |
Caches identifiers/selectors for NSFoundation APIs. | |
ObjCInterfaceDecl * | NSNumberDecl |
The declaration of the Objective-C NSNumber class. | |
ObjCInterfaceDecl * | NSValueDecl |
The declaration of the Objective-C NSValue class. | |
QualType | NSNumberPointer |
Pointer to NSNumber type (NSNumber *). | |
QualType | NSValuePointer |
Pointer to NSValue type (NSValue *). | |
ObjCMethodDecl * | NSNumberLiteralMethods [NSAPI::NumNSNumberLiteralMethods] |
The Objective-C NSNumber methods used to create NSNumber literals. | |
ObjCInterfaceDecl * | NSStringDecl |
The declaration of the Objective-C NSString class. | |
QualType | NSStringPointer |
Pointer to NSString type (NSString *). | |
ObjCMethodDecl * | StringWithUTF8StringMethod |
The declaration of the stringWithUTF8String: method. | |
ObjCMethodDecl * | ValueWithBytesObjCTypeMethod |
The declaration of the valueWithBytes:objCType: method. | |
ObjCInterfaceDecl * | NSArrayDecl |
The declaration of the Objective-C NSArray class. | |
ObjCMethodDecl * | ArrayWithObjectsMethod |
The declaration of the arrayWithObjects:count: method. | |
ObjCInterfaceDecl * | NSDictionaryDecl |
The declaration of the Objective-C NSDictionary class. | |
ObjCMethodDecl * | DictionaryWithObjectsMethod |
The declaration of the dictionaryWithObjects:forKeys:count: method. | |
QualType | QIDNSCopying |
id<NSCopying> type. | |
Selector | RespondsToSelectorSel |
will hold 'respondsToSelector:' | |
ExprResult | HandleExprPropertyRefExpr (const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) |
HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface. | |
ExprResult | ActOnClassPropertyRefExpr (const IdentifierInfo &receiverName, const IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc) |
ExprResult | ParseObjCStringLiteral (SourceLocation *AtLocs, ArrayRef< Expr * > Strings) |
ExprResult | BuildObjCStringLiteral (SourceLocation AtLoc, StringLiteral *S) |
ExprResult | BuildObjCNumericLiteral (SourceLocation AtLoc, Expr *Number) |
BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression. | |
ExprResult | ActOnObjCBoolLiteral (SourceLocation AtLoc, SourceLocation ValueLoc, bool Value) |
ExprResult | BuildObjCArrayLiteral (SourceRange SR, MultiExprArg Elements) |
ExprResult | BuildObjCBoxedExpr (SourceRange SR, Expr *ValueExpr) |
BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression. | |
ExprResult | BuildObjCSubscriptExpression (SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod) |
Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime. | |
ExprResult | BuildObjCDictionaryLiteral (SourceRange SR, MutableArrayRef< ObjCDictionaryElement > Elements) |
ExprResult | BuildObjCEncodeExpression (SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc) |
ExprResult | ParseObjCEncodeExpression (SourceLocation AtLoc, SourceLocation EncodeLoc, SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc) |
ExprResult | ParseObjCSelectorExpression (Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) |
ParseObjCSelectorExpression - Build selector expression for @selector. | |
ExprResult | ParseObjCProtocolExpression (IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc) |
ParseObjCProtocolExpression - Build protocol expression for @protocol. | |
ObjCMethodDecl * | tryCaptureObjCSelf (SourceLocation Loc) |
Try to capture an implicit reference to 'self'. | |
ObjCMessageKind | getObjCMessageKind (Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType) |
ExprResult | ActOnSuperMessage (Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args) |
ExprResult | BuildClassMessage (TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false) |
Build an Objective-C class message expression. | |
ExprResult | BuildClassMessageImplicit (QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args) |
ExprResult | ActOnClassMessage (Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args) |
ExprResult | BuildInstanceMessage (Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false) |
Build an Objective-C instance message expression. | |
ExprResult | BuildInstanceMessageImplicit (Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args) |
ExprResult | ActOnInstanceMessage (Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args) |
ExprResult | BuildObjCBridgedCast (SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) |
ExprResult | ActOnObjCBridgedCast (Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr) |
void | CheckTollFreeBridgeCast (QualType castType, Expr *castExpr) |
void | CheckObjCBridgeRelatedCast (QualType castType, Expr *castExpr) |
bool | CheckTollFreeBridgeStaticCast (QualType castType, Expr *castExpr, CastKind &Kind) |
bool | checkObjCBridgeRelatedComponents (SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose=true) |
bool | CheckObjCBridgeRelatedConversions (SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose=true) |
bool | isSelfExpr (Expr *RExpr) |
Private Helper predicate to check for 'self'. | |
bool | isSelfExpr (Expr *RExpr, const ObjCMethodDecl *Method) |
ObjCMethodDecl * | LookupMethodInQualifiedType (Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance) |
LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type. | |
ObjCMethodDecl * | LookupMethodInObjectType (Selector Sel, QualType Ty, bool IsInstance) |
LookupMethodInType - Look up a method in an ObjCObjectType. | |
bool | isKnownName (StringRef name) |
ARCConversionResult | CheckObjCConversion (SourceRange castRange, QualType castType, Expr *&op, CheckedConversionKind CCK, bool Diagnose=true, bool DiagnoseCFAudited=false, BinaryOperatorKind Opc=BO_PtrMemD) |
Checks for invalid conversions and casts between retainable pointers and other pointer kinds for ARC and Weak. | |
Expr * | stripARCUnbridgedCast (Expr *e) |
stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast. | |
void | diagnoseARCUnbridgedCast (Expr *e) |
Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly. | |
bool | CheckObjCARCUnavailableWeakConversion (QualType castType, QualType ExprType) |
bool | CheckMessageArgumentTypes (const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) |
CheckMessageArgumentTypes - Check types in an Obj-C message send. | |
QualType | getMessageSendResultType (const Expr *Receiver, QualType ReceiverType, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage) |
Determine the result of a message send expression based on the type of the receiver, the method expected to receive the message, and the form of the message send. | |
void | EmitRelatedResultTypeNote (const Expr *E) |
If the given expression involves a message send to a method with a related result type, emit a note describing what happened. | |
void | EmitRelatedResultTypeNoteForReturn (QualType destType) |
Given that we had incompatible pointer types in a return statement, check whether we're in a method with a related result type, and if so, emit a note describing what happened. | |
ObjCMethodDecl * | LookupInstanceMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false) |
LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures. | |
ObjCMethodDecl * | LookupFactoryMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false) |
LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures. | |
DeclResult | LookupIvarInObjCMethod (LookupResult &Lookup, Scope *S, IdentifierInfo *II) |
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method. | |
ExprResult | LookupInObjCMethod (LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false) |
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method. | |
ExprResult | BuildIvarRefExpr (Scope *S, SourceLocation Loc, ObjCIvarDecl *IV) |
QualType | FindCompositeObjCPointerType (ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) |
FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types of the two input expressions. | |
bool | CheckConversionToObjCLiteral (QualType DstType, Expr *&SrcExpr, bool Diagnose=true) |
ExprResult | ActOnObjCBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind) |
ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals. | |
ExprResult | ActOnObjCAvailabilityCheckExpr (llvm::ArrayRef< AvailabilitySpec > AvailSpecs, SourceLocation AtLoc, SourceLocation RParen) |
CastKind | PrepareCastToObjCObjectPointer (ExprResult &E) |
Prepare a conversion of the given expression to an ObjC object pointer type. | |
ObjCLiteralKind | CheckLiteralKind (Expr *FromE) |
Definition at line 52 of file SemaObjC.h.
Definition at line 317 of file SemaObjC.h.
typedef llvm::SmallPtrSet<Selector, 8> clang::SemaObjC::SelectorSet |
Definition at line 236 of file SemaObjC.h.
Enumerator | |
---|---|
ACR_okay | |
ACR_unbridged | |
ACR_error |
Definition at line 816 of file SemaObjC.h.
Enumerator | |
---|---|
MMS_loose | |
MMS_strict |
Definition at line 238 of file SemaObjC.h.
Enumerator | |
---|---|
OCK_None | |
OCK_Interface | |
OCK_Protocol | |
OCK_Category | |
OCK_ClassExtension | |
OCK_Implementation | |
OCK_CategoryImplementation |
Definition at line 240 of file SemaObjC.h.
Enumerator | |
---|---|
LK_Array | |
LK_Dictionary | |
LK_Numeric | |
LK_Boxed | |
LK_String | |
LK_Block | |
LK_None |
Definition at line 919 of file SemaObjC.h.
Describes the kind of message expression indicated by a message send that starts with an identifier.
Enumerator | |
---|---|
ObjCSuperMessage | The message is sent to 'super'. |
ObjCInstanceMessage | The message is an instance message. |
ObjCClassMessage | The message is a class message, and the identifier is a type name. |
Definition at line 718 of file SemaObjC.h.
Enumerator | |
---|---|
OSMK_None | |
OSMK_Alloc | |
OSMK_New | |
OSMK_Copy | |
OSMK_RetainingInit | |
OSMK_NonRetainingInit |
Definition at line 198 of file SemaObjC.h.
Enumerator | |
---|---|
OS_Array | |
OS_Dictionary | |
OS_Error |
Definition at line 149 of file SemaObjC.h.
Describes the compatibility of a result type with its method.
Enumerator | |
---|---|
RTC_Compatible | |
RTC_Incompatible | |
RTC_Unknown |
Definition at line 391 of file SemaObjC.h.
clang::SemaObjC::SemaObjC | ( | Sema & | S | ) |
Definition at line 29 of file SemaObjC.cpp.
Decl * SemaObjC::ActOnAtEnd | ( | Scope * | S, |
SourceRange | AtEnd, | ||
ArrayRef< Decl * > | allMethods = std::nullopt , |
||
ArrayRef< DeclGroupPtrTy > | allTUVars = std::nullopt |
||
) |
Check for instance method of the same name with incompatible types
The following allows us to typecheck messages to "id".
Check for class method of the same name with incompatible types
Definition at line 3983 of file SemaDeclObjC.cpp.
References clang::Sema::ActOnDocumentableDecl(), ActOnObjCContainerFinishDefinition(), AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), AtomicPropertySetterGetterRules(), clang::DeclGroupRef::begin(), clang::C, clang::NSAPI::ClassId_NSObject, clang::Sema::Consumer, clang::FixItHint::CreateInsertion(), clang::Sema::CurContext, clang::SemaBase::Diag(), DiagnoseCategoryDirectMembersProtocolConformance(), DiagnoseClassExtensionDupMethods(), DiagnoseDuplicateIvars(), DiagnoseMissingDesignatedInitOverrides(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseRetainableFlexibleArrayMember(), DiagnoseUnusedBackingIvarInAccessor(), DiagnoseVariableSizedIvars(), DiagnoseWeakIvars(), clang::ObjCPropertyImplDecl::Dynamic, E, clang::DeclGroupRef::end(), clang::SemaBase::getASTContext(), clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getDefinition(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::Sema::getLocForEndOfToken(), getObjCContainerKind(), clang::ObjCMethodDecl::getSelector(), clang::ASTContext::getSourceManager(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ASTConsumer::HandleTopLevelDeclInObjCContainer(), ImplMethodsVsClassMethods(), clang::ObjCMethodDecl::isInstanceMethod(), clang::SourceManager::isInSystemHeader(), clang::ObjCRuntime::isNonFragile(), clang::SourceRange::isValid(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::ast_matchers::match(), MatchTwoMethodDeclarations(), NSAPIObj, OCK_None, ProcessPropertyDecl(), clang::Property, clang::SemaBase::SemaRef, clang::ObjCMethodDecl::setAsRedeclaration(), clang::Decl::setInvalidDecl(), SetIvarInitializers(), and clang::Sema::TUScope.
ExprResult SemaObjC::ActOnClassMessage | ( | Scope * | S, |
ParsedType | Receiver, | ||
Selector | Sel, | ||
SourceLocation | LBracLoc, | ||
ArrayRef< SourceLocation > | SelectorLocs, | ||
SourceLocation | RBracLoc, | ||
MultiExprArg | Args | ||
) |
Definition at line 2767 of file SemaExprObjC.cpp.
References BuildClassMessage(), clang::ExprError(), clang::SemaBase::getASTContext(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Sema::GetTypeFromParser(), clang::QualType::isNull(), and clang::SemaBase::SemaRef.
ExprResult SemaObjC::ActOnClassPropertyRefExpr | ( | const IdentifierInfo & | receiverName, |
const IdentifierInfo & | propertyName, | ||
SourceLocation | receiverNameLoc, | ||
SourceLocation | propertyNameLoc | ||
) |
Definition at line 2171 of file SemaExprObjC.cpp.
References clang::Type::castAs(), clang::SelectorTable::constructSetterSelector(), clang::SemaBase::Diag(), clang::Sema::DiagnoseUseOfDecl(), clang::ExprError(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::SemaBase::getASTContext(), clang::ObjCInterfaceDecl::getCategoryClassMethod(), clang::Preprocessor::getIdentifierTable(), clang::SelectorTable::getNullarySelector(), getObjCInterfaceDecl(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::Preprocessor::getSelectorTable(), clang::ObjCInterfaceDecl::getSuperClass(), HandleExprPropertyRefExpr(), clang::QualType::isNull(), clang::IdentifierInfo::isStr(), clang::ObjCInterfaceDecl::lookupClassMethod(), clang::ObjCInterfaceDecl::lookupPrivateClassMethod(), clang::OBJC_PR_query_class, clang::OK_ObjCProperty, clang::Sema::PP, clang::ASTContext::PseudoObjectTy, clang::SemaBase::SemaRef, clang::T, tryCaptureObjCSelf(), and clang::VK_LValue.
Decl * SemaObjC::ActOnCompatibilityAlias | ( | SourceLocation | AtLoc, |
IdentifierInfo * | AliasName, | ||
SourceLocation | AliasLocation, | ||
IdentifierInfo * | ClassName, | ||
SourceLocation | ClassLocation | ||
) |
ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias declaration.
It sets up the alias relationships.
Definition at line 1142 of file SemaDeclObjC.cpp.
References clang::AliasDecl, clang::Type::castAs(), CheckObjCDeclScope(), clang::ObjCCompatibleAliasDecl::Create(), clang::Sema::CurContext, clang::SemaBase::Diag(), clang::Sema::forRedeclarationInCurContext(), clang::SemaBase::getASTContext(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), clang::Type::isObjCObjectType(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::Sema::PushOnScopeChains(), clang::SemaBase::SemaRef, clang::T, and clang::Sema::TUScope.
void SemaObjC::ActOnDefs | ( | Scope * | S, |
Decl * | TagD, | ||
SourceLocation | DeclStart, | ||
const IdentifierInfo * | ClassName, | ||
SmallVectorImpl< Decl * > & | Decls | ||
) |
Called whenever @defs(ClassName) is encountered in the source.
Inserts the instance variables of ClassName into Decls.
Definition at line 5113 of file SemaDeclObjC.cpp.
References clang::Class, clang::CPlusPlus, clang::ObjCAtDefsFieldDecl::Create(), D, clang::ASTContext::DeepCollectObjCIvars(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::SemaBase::getLangOpts(), getObjCInterfaceDecl(), clang::ObjCRuntime::isNonFragile(), clang::Sema::PushOnScopeChains(), and clang::SemaBase::SemaRef.
SemaObjC::DeclGroupPtrTy SemaObjC::ActOnFinishObjCImplementation | ( | Decl * | ObjCImpDecl, |
ArrayRef< Decl * > | Decls | ||
) |
Definition at line 2117 of file SemaDeclObjC.cpp.
References clang::Sema::BuildDeclaratorGroup(), clang::Decl::getDeclContext(), clang::DeclContext::isFileContext(), clang::SemaBase::SemaRef, and clang::Decl::setTopLevelDeclInObjCContainer().
SemaObjC::DeclGroupPtrTy SemaObjC::ActOnForwardClassDeclaration | ( | SourceLocation | Loc, |
IdentifierInfo ** | IdentList, | ||
SourceLocation * | IdentLocs, | ||
ArrayRef< ObjCTypeParamList * > | TypeParamLists, | ||
unsigned | NumElts | ||
) |
Definition at line 3060 of file SemaDeclObjC.cpp.
References clang::Sema::BuildDeclaratorGroup(), CheckObjCDeclScope(), checkTypeParamListConsistency(), clang::ObjCInterfaceDecl::Create(), clang::Sema::CurContext, clang::SemaBase::Diag(), clang::Sema::forRedeclarationInCurContext(), clang::SemaBase::getASTContext(), clang::ObjCInterfaceDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ObjCTypeParamList::getSourceRange(), clang::ObjCInterfaceDecl::getTypeParamList(), clang::TypedefNameDecl::getUnderlyingType(), clang::Type::isObjCObjectType(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::Sema::mergeDeclAttributes(), clang::Sema::PushOnScopeChains(), clang::SemaBase::SemaRef, clang::ObjCContainerDecl::setAtEndRange(), and clang::Sema::TUScope.
SemaObjC::DeclGroupPtrTy SemaObjC::ActOnForwardProtocolDeclaration | ( | SourceLocation | AtProtoclLoc, |
ArrayRef< IdentifierLocPair > | IdentList, | ||
const ParsedAttributesView & | attrList | ||
) |
ActOnForwardProtocolDeclaration - Handle @protocol foo;.
Definition at line 1786 of file SemaDeclObjC.cpp.
References clang::Sema::AddPragmaAttributes(), clang::Sema::BuildDeclaratorGroup(), CheckObjCDeclScope(), clang::ObjCProtocolDecl::Create(), clang::Sema::CurContext, clang::Sema::forRedeclarationInCurContext(), clang::SemaBase::getASTContext(), LookupProtocol(), clang::Sema::mergeDeclAttributes(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::PushOnScopeChains(), clang::SemaBase::SemaRef, and clang::Sema::TUScope.
ExprResult SemaObjC::ActOnInstanceMessage | ( | Scope * | S, |
Expr * | Receiver, | ||
Selector | Sel, | ||
SourceLocation | LBracLoc, | ||
ArrayRef< SourceLocation > | SelectorLocs, | ||
SourceLocation | RBracLoc, | ||
MultiExprArg | Args | ||
) |
Definition at line 3425 of file SemaExprObjC.cpp.
References BuildInstanceMessage(), clang::ExprError(), clang::IdentifierTable::get(), clang::SemaBase::getASTContext(), clang::Expr::getType(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, clang::Selector::isNull(), clang::Sema::MaybeConvertParenListExprToParenExpr(), RemoveSelectorFromWarningCache(), RespondsToSelectorSel, clang::Result, clang::ASTContext::Selectors, and clang::SemaBase::SemaRef.
Decl * SemaObjC::ActOnIvar | ( | Scope * | S, |
SourceLocation | DeclStart, | ||
Declarator & | D, | ||
Expr * | BitWidth, | ||
tok::ObjCKeywordKind | visibility | ||
) |
ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDecl object for it.
Definition at line 5573 of file SemaDeclObjC.cpp.
References clang::IdentifierResolver::AddDecl(), clang::Type::containsErrors(), clang::ObjCIvarDecl::Create(), clang::Sema::CurContext, D, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getASTContext(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::TypeSourceInfo::getType(), clang::Sema::GetTypeForDeclarator(), clang::Sema::IdResolver, inferObjCARCLifetime(), clang::Sema::isDeclInScope(), clang::ObjCRuntime::isFragile(), clang::Decl::isInvalidDecl(), clang::ObjCRuntime::isNonFragile(), clang::Type::isReferenceType(), clang::Type::isVariablyModifiedType(), Loc, clang::Sema::LookupMemberName, clang::Sema::LookupSingleName(), clang::ObjCIvarDecl::None, clang::Sema::ProcessDeclAttributes(), clang::SemaBase::SemaRef, clang::Decl::setInvalidDecl(), clang::NamedDecl::setModulePrivate(), clang::T, TranslateIvarVisibility(), clang::Sema::tryToFixVariablyModifiedVarType(), and clang::Sema::VerifyBitField().
Decl * SemaObjC::ActOnMethodDeclaration | ( | Scope * | S, |
SourceLocation | BeginLoc, | ||
SourceLocation | EndLoc, | ||
tok::TokenKind | MethodType, | ||
ObjCDeclSpec & | ReturnQT, | ||
ParsedType | ReturnType, | ||
ArrayRef< SourceLocation > | SelectorLocs, | ||
Selector | Sel, | ||
ObjCArgInfo * | ArgInfo, | ||
DeclaratorChunk::ParamInfo * | CParamInfo, | ||
unsigned | CNumArgs, | ||
const ParsedAttributesView & | AttrList, | ||
tok::ObjCKeywordKind | MethodImplKind, | ||
bool | isVariadic, | ||
bool | MethodDefinition | ||
) |
Definition at line 4728 of file SemaDeclObjC.cpp.
References clang::Sema::ActOnDocumentableDecl(), clang::Decl::addAttr(), clang::IdentifierResolver::AddDecl(), clang::Sema::AddPragmaAttributes(), clang::SemaObjC::ObjCArgInfo::ArgAttrs, clang::ast_matchers::attr, clang::C, CheckARCMethodDecl(), clang::Sema::CheckFunctionReturnType(), checkObjCDirectMethodClashes(), CheckObjCMethodOverrides(), checkObjCMethodX86VectorTypes(), clang::Sema::CheckParameter(), CheckRelatedResultTypeCompatibility(), clang::ObjCMethodDecl::Create(), clang::ObjCMethodDecl::createImplicitParams(), clang::FixItHint::CreateInsertion(), clang::Sema::CurContext, CvtQTToAstBitMask(), clang::ast_matchers::decl, clang::SemaBase::Diag(), diagnoseNoescape(), clang::Decl::dropAttr(), clang::Sema::forRedeclarationInCurContext(), clang::ASTContext::getAdjustedParameterType(), clang::Selector::getAsString(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::TypeLoc::getBeginLoc(), clang::ObjCMethodDecl::getCanonicalDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getMethodFamily(), clang::Selector::getNumArgs(), clang::ObjCDeclSpec::getObjCDeclQualifier(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::Sema::GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::Sema::IdResolver, clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isDirectMethod(), clang::ObjCMethodDecl::isInstanceMethod(), clang::QualType::isNull(), clang::DeclContext::isObjCContainer(), clang::Type::isObjCIndependentClassType(), clang::LookupResult::isSingleResult(), clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, mergeInterfaceMethodToImpl(), mergeObjCDirectMembers(), clang::SemaObjC::ObjCArgInfo::Name, clang::SemaObjC::ObjCArgInfo::NameLoc, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::Optional, P, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::parameters(), clang::Sema::ProcessAPINotes(), clang::Sema::ProcessDeclAttributeList(), clang::Required, RTC_Compatible, clang::SC_None, clang::SemaBase::SemaRef, clang::Decl::setDeclContext(), clang::Decl::setInvalidDecl(), clang::ObjCMethodDecl::setMethodParams(), clang::ParmVarDecl::setObjCDeclQualifier(), clang::ObjCMethodDecl::setObjCDeclQualifier(), clang::ParmVarDecl::setObjCMethodScopeInfo(), clang::ObjCMethodDecl::setRelatedResultType(), clang::AttributedType::stripOuterNullability(), and clang::Sema::TUScope.
StmtResult clang::SemaObjC::ActOnObjCAtCatchStmt | ( | SourceLocation | AtLoc, |
SourceLocation | RParen, | ||
Decl * | Parm, | ||
Stmt * | Body | ||
) |
Definition at line 207 of file SemaObjC.cpp.
References clang::SemaBase::getASTContext(), clang::Decl::isInvalidDecl(), and clang::StmtError().
Referenced by clang::TreeTransform< Derived >::RebuildObjCAtCatchStmt().
StmtResult clang::SemaObjC::ActOnObjCAtFinallyStmt | ( | SourceLocation | AtLoc, |
Stmt * | Body | ||
) |
Definition at line 218 of file SemaObjC.cpp.
References clang::SemaBase::getASTContext().
Referenced by clang::TreeTransform< Derived >::RebuildObjCAtFinallyStmt().
ExprResult clang::SemaObjC::ActOnObjCAtSynchronizedOperand | ( | SourceLocation | atLoc, |
Expr * | operand | ||
) |
Definition at line 287 of file SemaObjC.cpp.
References clang::Sema::ActOnFinishFullExpr(), clang::Sema::DefaultLvalueConversion(), clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Sema::PerformContextuallyConvertToObjCPointer(), clang::ast_matchers::pointerType, clang::Sema::RequireCompleteType(), clang::SemaBase::SemaRef, and clang::ast_matchers::type.
Referenced by clang::TreeTransform< Derived >::RebuildObjCAtSynchronizedOperand().
StmtResult clang::SemaObjC::ActOnObjCAtSynchronizedStmt | ( | SourceLocation | AtLoc, |
Expr * | SynchExpr, | ||
Stmt * | SynchBody | ||
) |
Definition at line 325 of file SemaObjC.cpp.
References clang::SemaBase::getASTContext(), clang::SemaBase::SemaRef, and clang::Sema::setFunctionHasBranchProtectedScope().
Referenced by clang::TreeTransform< Derived >::RebuildObjCAtSynchronizedStmt().
StmtResult clang::SemaObjC::ActOnObjCAtThrowStmt | ( | SourceLocation | AtLoc, |
Expr * | Throw, | ||
Scope * | CurScope | ||
) |
Definition at line 270 of file SemaObjC.cpp.
References BuildObjCAtThrowStmt(), clang::SemaBase::Diag(), clang::SemaBase::getLangOpts(), clang::Scope::getParent(), clang::Scope::isAtCatchScope(), and clang::StmtError().
StmtResult clang::SemaObjC::ActOnObjCAtTryStmt | ( | SourceLocation | AtLoc, |
Stmt * | Try, | ||
MultiStmtArg | Catch, | ||
Stmt * | Finally | ||
) |
Definition at line 223 of file SemaObjC.cpp.
References clang::ObjCAtTryStmt::Create(), clang::SemaBase::Diag(), clang::sema::FunctionScopeInfo::FirstSEHTryLoc, clang::SemaBase::getASTContext(), clang::Sema::getCurFunction(), clang::SemaBase::getLangOpts(), clang::SourceLocation::isValid(), clang::SemaBase::SemaRef, and clang::sema::FunctionScopeInfo::setHasObjCTry().
Referenced by clang::TreeTransform< Derived >::RebuildObjCAtTryStmt().
StmtResult clang::SemaObjC::ActOnObjCAutoreleasePoolStmt | ( | SourceLocation | AtLoc, |
Stmt * | Body | ||
) |
Definition at line 334 of file SemaObjC.cpp.
References clang::SemaBase::getASTContext(), clang::SemaBase::SemaRef, and clang::Sema::setFunctionHasBranchProtectedScope().
Referenced by clang::TreeTransform< Derived >::RebuildObjCAutoreleasePoolStmt().
ExprResult SemaObjC::ActOnObjCAvailabilityCheckExpr | ( | llvm::ArrayRef< AvailabilitySpec > | AvailSpecs, |
SourceLocation | AtLoc, | ||
SourceLocation | RParen | ||
) |
Definition at line 5160 of file SemaExprObjC.cpp.
References clang::ASTContext::BoolTy, clang::SemaBase::getASTContext(), clang::Sema::getCurFunctionAvailabilityContext(), clang::AvailabilitySpec::getPlatform(), clang::TargetInfo::getPlatformName(), clang::ASTContext::getTargetInfo(), clang::AvailabilitySpec::getVersion(), and clang::SemaBase::SemaRef.
ExprResult SemaObjC::ActOnObjCBoolLiteral | ( | SourceLocation | AtLoc, |
SourceLocation | ValueLoc, | ||
bool | Value | ||
) |
Definition at line 374 of file SemaExprObjC.cpp.
References clang::Sema::ActOnCXXBoolLiteral(), clang::Sema::ActOnIntegerConstant(), clang::ASTContext::BoolTy, BuildObjCNumericLiteral(), clang::CPlusPlus, clang::SemaBase::getASTContext(), clang::SemaBase::getLangOpts(), clang::Sema::ImpCastExprToType(), and clang::SemaBase::SemaRef.
ExprResult SemaObjC::ActOnObjCBoolLiteral | ( | SourceLocation | OpLoc, |
tok::TokenKind | Kind | ||
) |
ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
Definition at line 5138 of file SemaExprObjC.cpp.
References clang::IdentifierTable::get(), clang::SemaBase::getASTContext(), clang::ASTContext::getBOOLDecl(), clang::ASTContext::getBOOLType(), clang::Sema::getCurScope(), clang::ASTContext::Idents, clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::ASTContext::ObjCBuiltinBoolTy, clang::Result, clang::SemaBase::SemaRef, and clang::ASTContext::setBOOLDecl().
ExprResult SemaObjC::ActOnObjCBridgedCast | ( | Scope * | S, |
SourceLocation | LParenLoc, | ||
ObjCBridgeCastKind | Kind, | ||
SourceLocation | BridgeKeywordLoc, | ||
ParsedType | Type, | ||
SourceLocation | RParenLoc, | ||
Expr * | SubExpr | ||
) |
Definition at line 4765 of file SemaExprObjC.cpp.
References BuildObjCBridgedCast(), CheckTollFreeBridgeCast(), clang::SemaBase::getASTContext(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Sema::GetTypeFromParser(), clang::OBC_Bridge, clang::SemaBase::SemaRef, and clang::T.
void clang::SemaObjC::ActOnObjCContainerFinishDefinition | ( | ) |
Definition at line 1283 of file SemaObjC.cpp.
References clang::Sema::PopDeclContext(), and clang::SemaBase::SemaRef.
Referenced by ActOnAtEnd(), and ActOnObjCTemporaryExitContainerContext().
void clang::SemaObjC::ActOnObjCContainerStartDefinition | ( | ObjCContainerDecl * | IDecl | ) |
Definition at line 1276 of file SemaObjC.cpp.
References clang::Sema::CurContext, clang::DeclContext::getLexicalParent(), and clang::SemaBase::SemaRef.
Referenced by ActOnObjCReenterContainerContext(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), and ActOnStartProtocolInterface().
Decl * SemaObjC::ActOnObjCExceptionDecl | ( | Scope * | S, |
Declarator & | D | ||
) |
Definition at line 5202 of file SemaDeclObjC.cpp.
References clang::IdentifierResolver::AddDecl(), BuildObjCExceptionDecl(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::CPlusPlus, clang::FixItHint::CreateRemoval(), D, clang::SemaBase::Diag(), clang::Sema::DiagnoseFunctionSpecifiers(), clang::SourceRange::getBegin(), clang::DeclSpec::getInlineSpecLoc(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::Decl::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), clang::Sema::GetTypeForDeclarator(), clang::Decl::hasAttr(), clang::Sema::IdResolver, clang::DeclSpec::isInlineSpecified(), clang::Sema::ProcessDeclAttributes(), clang::DeclSpec::SCS_register, clang::SemaBase::SemaRef, and clang::Decl::setInvalidDecl().
StmtResult clang::SemaObjC::ActOnObjCForCollectionStmt | ( | SourceLocation | ForColLoc, |
Stmt * | First, | ||
Expr * | collection, | ||
SourceLocation | RParenLoc | ||
) |
Definition at line 36 of file SemaObjC.cpp.
References clang::Sema::ActOnFinishFullExpr(), clang::AlreadyDiagnosed, CheckObjCForCollectionOperand(), D, clang::Sema::DeduceAutoType(), clang::SemaBase::Diag(), clang::Sema::DiagnoseAutoDeductionFailure(), clang::First, clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getASTContext(), clang::Type::getContainedAutoType(), clang::Sema::inTemplateInstantiation(), clang::Type::isBlockPointerType(), clang::QualType::isConstQualified(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isLValue(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Expr::isTypeDependent(), Loc, clang::Result, clang::SemaBase::SemaRef, clang::Sema::setFunctionHasBranchProtectedScope(), clang::StmtError(), clang::Success, and clang::VK_PRValue.
Referenced by clang::Sema::ActOnCXXForRangeStmt(), clang::TreeTransform< Derived >::RebuildCXXForRangeStmt(), and clang::TreeTransform< Derived >::RebuildObjCForCollectionStmt().
ParsedType clang::SemaObjC::ActOnObjCInstanceType | ( | SourceLocation | Loc | ) |
The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration.
Return the appropriate type.
Definition at line 745 of file SemaObjC.cpp.
References clang::Sema::CreateParsedType(), clang::SemaBase::getASTContext(), Loc, clang::SemaBase::SemaRef, and clang::T.
TypeResult clang::SemaObjC::actOnObjCProtocolQualifierType | ( | SourceLocation | lAngleLoc, |
ArrayRef< Decl * > | protocols, | ||
ArrayRef< SourceLocation > | protocolLocs, | ||
SourceLocation | rAngleLoc | ||
) |
Build a an Objective-C protocol-qualified 'id' type where no base type was specified.
Definition at line 341 of file SemaObjC.cpp.
References clang::TypeLoc::castAs(), clang::Sema::CreateParsedType(), clang::SemaBase::getASTContext(), clang::TypeSourceInfo::getTypeLoc(), clang::Result, clang::SemaBase::SemaRef, clang::ObjCObjectTypeLoc::setHasBaseTypeAsWritten(), and clang::ObjCObjectPointerTypeLoc::setStarLoc().
void clang::SemaObjC::ActOnObjCReenterContainerContext | ( | ObjCContainerDecl * | ObjCCtx | ) |
Definition at line 1295 of file SemaObjC.cpp.
References ActOnObjCContainerStartDefinition(), clang::Sema::OriginalLexicalContext, and clang::SemaBase::SemaRef.
void clang::SemaObjC::ActOnObjCTemporaryExitContainerContext | ( | ObjCContainerDecl * | ObjCCtx | ) |
Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs.
Must be followed by a call to
Definition at line 1288 of file SemaObjC.cpp.
References ActOnObjCContainerFinishDefinition(), clang::Sema::CurContext, clang::Sema::OriginalLexicalContext, and clang::SemaBase::SemaRef.
TypeResult clang::SemaObjC::actOnObjCTypeArgsAndProtocolQualifiers | ( | Scope * | S, |
SourceLocation | Loc, | ||
ParsedType | BaseType, | ||
SourceLocation | TypeArgsLAngleLoc, | ||
ArrayRef< ParsedType > | TypeArgs, | ||
SourceLocation | TypeArgsRAngleLoc, | ||
SourceLocation | ProtocolLAngleLoc, | ||
ArrayRef< Decl * > | Protocols, | ||
ArrayRef< SourceLocation > | ProtocolLocs, | ||
SourceLocation | ProtocolRAngleLoc | ||
) |
Build a specialized and/or protocol-qualified Objective-C type.
Definition at line 378 of file SemaObjC.cpp.
References BuildObjCObjectType(), clang::TypeLoc::castAs(), clang::Sema::CreateParsedType(), clang::TypeLoc::getAs(), clang::SemaBase::getASTContext(), clang::SourceRange::getBegin(), clang::TypeLoc::getSourceRange(), clang::Sema::GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::isNull(), Loc, clang::Result, clang::SemaBase::SemaRef, and clang::T.
Referenced by ActOnSuperClassOfClassInterface().
void SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers | ( | Scope * | S, |
ParsedType | baseType, | ||
SourceLocation | lAngleLoc, | ||
ArrayRef< IdentifierInfo * > | identifiers, | ||
ArrayRef< SourceLocation > | identifierLocs, | ||
SourceLocation | rAngleLoc, | ||
SourceLocation & | typeArgsLAngleLoc, | ||
SmallVectorImpl< ParsedType > & | typeArgs, | ||
SourceLocation & | typeArgsRAngleLoc, | ||
SourceLocation & | protocolLAngleLoc, | ||
SmallVectorImpl< Decl * > & | protocols, | ||
SourceLocation & | protocolRAngleLoc, | ||
bool | warnOnIncompleteProtocols | ||
) |
Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol qualifiers or type arguments, as appropriate.
Definition at line 1426 of file SemaDeclObjC.cpp.
References clang::Sema::ActOnTypeName(), clang::ASTContext::CollectInheritedProtocols(), clang::Sema::CorrectTypo(), clang::FixItHint::CreateInsertion(), clang::Sema::CreateParsedType(), clang::Sema::CTK_ErrorRecovery, D, clang::ast_matchers::decl, clang::SemaBase::Diag(), DiagnoseTypeArgsAndProtocols(), clang::Sema::diagnoseTypo(), clang::Sema::DiagnoseUseOfDecl(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::TypoCorrection::getCorrectionDeclAs(), clang::NamedDecl::getDeclName(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), clang::Sema::getLocForEndOfToken(), clang::ASTContext::getObjCInterfaceType(), clang::DeclaratorChunk::getPointer(), clang::ASTContext::getPrintingPolicy(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), clang::Sema::GetTypeFromParser(), clang::ObjCInterfaceDecl::getTypeParamList(), clang::SourceLocation::isInvalid(), clang::QualType::isNull(), clang::ObjCProtocolDecl::isThisDeclarationADefinition(), clang::SourceLocation::isValid(), clang::Sema::LookupAnyName, clang::Sema::LookupObjCProtocolName, clang::Sema::LookupOrdinaryName, LookupProtocol(), clang::Sema::LookupSingleName(), NestedProtocolHasNoDefinition(), clang::ParsedAttributesView::none(), clang::SemaBase::PDiag(), clang::SemaBase::SemaRef, clang::DeclSpec::SetRangeEnd(), clang::DeclSpec::SetRangeStart(), clang::DeclSpec::SetTypeSpecType(), clang::DeclSpec::TST_typename, clang::ast_matchers::type, and clang::TypeName.
DeclResult SemaObjC::actOnObjCTypeParam | ( | Scope * | S, |
ObjCTypeParamVariance | variance, | ||
SourceLocation | varianceLoc, | ||
unsigned | index, | ||
IdentifierInfo * | paramName, | ||
SourceLocation | paramLoc, | ||
SourceLocation | colonLoc, | ||
ParsedType | typeBound | ||
) |
Definition at line 666 of file SemaDeclObjC.cpp.
References clang::ast_matchers::attr, clang::ObjCTypeParamDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::Sema::CurContext, clang::SemaBase::Diag(), clang::Qualifiers::empty(), clang::TypeLoc::findExplicitQualifierLoc(), clang::TypeLoc::getAs(), clang::Qualifiers::getAsString(), clang::SemaBase::getASTContext(), clang::TypeLoc::getBeginLoc(), clang::TypeLoc::getEndLoc(), clang::Sema::getLocForEndOfToken(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCObjectPointerType(), clang::QualType::getQualifiers(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::Sema::GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::QualType::getUnqualifiedType(), clang::QualType::hasQualifiers(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushFullCopy(), clang::Qualifiers::removeCVRQualifiers(), clang::SemaBase::SemaRef, and clang::ObjCObjectPointerTypeLoc::setStarLoc().
ObjCTypeParamList * SemaObjC::actOnObjCTypeParamList | ( | Scope * | S, |
SourceLocation | lAngleLoc, | ||
ArrayRef< Decl * > | typeParams, | ||
SourceLocation | rAngleLoc | ||
) |
Definition at line 769 of file SemaDeclObjC.cpp.
References clang::ObjCTypeParamList::create(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Sema::PushOnScopeChains(), and clang::SemaBase::SemaRef.
Decl * SemaObjC::ActOnProperty | ( | Scope * | S, |
SourceLocation | AtLoc, | ||
SourceLocation | LParenLoc, | ||
FieldDeclarator & | FD, | ||
ObjCDeclSpec & | ODS, | ||
Selector | GetterSel, | ||
Selector | SetterSel, | ||
tok::ObjCKeywordKind | MethodImplKind, | ||
DeclContext * | lexicalDC = nullptr |
||
) |
Definition at line 174 of file SemaObjCProperty.cpp.
References clang::Sema::ActOnDocumentableDecl(), CheckObjCPropertyAttributes(), CheckPropertyAgainstProtocol(), checkPropertyDeclWithOwnership(), CreatePropertyDecl(), clang::Sema::CurContext, clang::FieldDeclarator::D, deducePropertyOwnershipFromType(), DiagnosePropertyMismatch(), clang::ObjCDeclSpec::getGetterNameLoc(), clang::NamedDecl::getIdentifier(), clang::QualType::getObjCLifetime(), getOwnershipRule(), clang::ObjCDeclSpec::getPropertyAttributes(), clang::ObjCDeclSpec::getSetterNameLoc(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCPropertyDecl::getType(), clang::TypeSourceInfo::getType(), clang::Sema::GetTypeForDeclarator(), HandlePropertyInClassExtension(), clang::ObjCPropertyDecl::isInstanceProperty(), clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_weak, P, clang::ObjCInterfaceDecl::protocols(), clang::ObjCProtocolDecl::protocols(), clang::SemaBase::SemaRef, clang::Decl::setLexicalDeclContext(), clang::Declarator::setObjCWeakProperty(), and clang::T.
Decl * SemaObjC::ActOnPropertyImplDecl | ( | Scope * | S, |
SourceLocation | AtLoc, | ||
SourceLocation | PropertyLoc, | ||
bool | ImplKind, | ||
IdentifierInfo * | PropertyId, | ||
IdentifierInfo * | PropertyIvar, | ||
SourceLocation | PropertyIvarLoc, | ||
ObjCPropertyQueryKind | QueryKind | ||
) |
ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property implementation declaration; declared as @synthesize or @dynamic.
Definition at line 1062 of file SemaObjCProperty.cpp.
References clang::Sema::AbstractSynthesizedIvarType, clang::DeclContext::addDecl(), clang::Qualifiers::addObjCLifetime(), clang::ObjCImplDecl::addPropertyImplementation(), clang::Sema::BuildBinOp(), clang::ast_matchers::callExpr, clang::ASTContext::canAssignObjCInterfaces(), clang::Type::castAs(), Category, checkARCPropertyImpl(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::Compatible, clang::CPlusPlus, clang::ObjCPropertyImplDecl::Create(), clang::ObjCIvarDecl::Create(), clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateReplacement(), clang::Sema::CurContext, clang::declaresSameEntity(), clang::SemaBase::Diag(), clang::ObjCPropertyImplDecl::Dynamic, clang::DeclContextLookupResult::find_first(), clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCImplDecl::FindPropertyImplDecl(), clang::ObjCImplDecl::FindPropertyImplIvarDecl(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::Decl::getBeginLoc(), clang::ASTContext::getCanonicalType(), clang::ObjCImplDecl::getClassInterface(), clang::RecordType::getDecl(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), getImpliedARCOwnership(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::ObjCContainerDecl::getMethod(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::ASTContext::getObjCGCQualType(), clang::QualType::getObjCLifetime(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyImplementation(), clang::ASTContext::getQualifiedType(), clang::ObjCIvarDecl::getSynthesize(), clang::ValueDecl::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::ObjCIvarDecl::getUsageType(), clang::RecordDecl::hasFlexibleArrayMember(), clang::ASTContext::hasSameType(), hasWrittenStorageAttribute(), clang::InitializedEntity::InitializeResult(), clang::ObjCInterfaceDecl::isArcWeakrefUnavailable(), clang::Type::isArithmeticType(), clang::ObjCPropertyDecl::isDirectProperty(), clang::ObjCRuntime::isFragile(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::ObjCRuntime::isNonFragile(), clang::QualType::isObjCGCStrong(), clang::QualType::isObjCGCWeak(), clang::ObjCInterfaceDecl::isObjCRequiresPropertyDefs(), clang::Type::isObjCRetainableType(), clang::Type::isRecordType(), clang::SourceLocation::isValid(), clang::ObjCPropertyAttribute::kind_atomic, clang::ObjCPropertyAttribute::kind_nonatomic, clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_strong, clang::ObjCPropertyAttribute::kind_weak, clang::ObjCInterfaceDecl::known_extensions(), LocPropertyAttribute(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), clang::DeclContext::makeDeclVisibleInContext(), clang::Sema::MarkDeclRefReferenced(), clang::Sema::MaybeCreateExprWithCleanups(), clang::LangOptionsBase::NonGC, clang::OMF_autorelease, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, P, clang::Sema::PerformCopyInitialization(), clang::ObjCIvarDecl::Private, RedeclarePropertyAccessor(), clang::Sema::RequireCompleteType(), clang::Sema::RequireNonAbstractType(), SelectPropertyForSynthesisFromProtocols(), clang::SemaBase::SemaRef, clang::ObjCPropertyImplDecl::setGetterCXXConstructor(), clang::ObjCPropertyImplDecl::setGetterMethodDecl(), setImpliedPropertyAttributeForReadOnlyProperty(), clang::Decl::setInvalidDecl(), clang::ObjCPropertyImplDecl::setSetterCXXAssignment(), clang::ObjCPropertyImplDecl::setSetterMethodDecl(), clang::ObjCPropertyImplDecl::Synthesize, clang::T, clang::VK_LValue, clang::VK_PRValue, and clang::Qualifiers::Weak.
Referenced by DefaultSynthesizeProperties().
ObjCCategoryImplDecl * SemaObjC::ActOnStartCategoryImplementation | ( | SourceLocation | AtCatImplLoc, |
const IdentifierInfo * | ClassName, | ||
SourceLocation | ClassLoc, | ||
const IdentifierInfo * | CatName, | ||
SourceLocation | CatLoc, | ||
const ParsedAttributesView & | AttrList | ||
) |
ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration and build an ObjCCategoryImplDecl object.
Check that class of this category is already completely declared.
Check that CatName, category name, is not used in another implementation.
Definition at line 1913 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), clang::DeclContext::addDecl(), clang::Sema::AddPragmaAttributes(), CheckObjCDeclScope(), clang::ObjCCategoryImplDecl::Create(), clang::ObjCCategoryDecl::Create(), clang::Sema::CurContext, clang::SemaBase::Diag(), DiagnoseObjCImplementedDeprecations(), clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::SemaBase::getASTContext(), clang::NamedDecl::getDeclName(), clang::ObjCCategoryDecl::getImplementation(), clang::Decl::getLocation(), getObjCInterfaceDecl(), clang::ASTContext::getObjCInterfaceType(), clang::Decl::hasAttr(), clang::ObjCInterfaceDecl::hasDefinition(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::RequireCompleteType(), clang::SemaBase::SemaRef, clang::ObjCCategoryDecl::setImplementation(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), and clang::Sema::TUScope.
ObjCCategoryDecl * SemaObjC::ActOnStartCategoryInterface | ( | SourceLocation | AtInterfaceLoc, |
const IdentifierInfo * | ClassName, | ||
SourceLocation | ClassLoc, | ||
ObjCTypeParamList * | typeParamList, | ||
const IdentifierInfo * | CategoryName, | ||
SourceLocation | CategoryLoc, | ||
Decl *const * | ProtoRefs, | ||
unsigned | NumProtoRefs, | ||
const SourceLocation * | ProtoLocs, | ||
SourceLocation | EndProtoLoc, | ||
const ParsedAttributesView & | AttrList | ||
) |
Check that class of this category is already completely declared.
Check for duplicate interface declaration for this category
Definition at line 1814 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), clang::DeclContext::addDecl(), clang::Sema::AddPragmaAttributes(), CheckObjCDeclScope(), checkTypeParamListConsistency(), clang::ObjCCategoryDecl::Create(), clang::Sema::CurContext, clang::SemaBase::Diag(), diagnoseUseOfProtocols(), clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::SemaBase::getASTContext(), clang::ObjCInterfaceDecl::getImplementation(), clang::ObjCTypeParamList::getLAngleLoc(), clang::Decl::getLocation(), getObjCInterfaceDecl(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCTypeParamList::getSourceRange(), clang::ObjCInterfaceDecl::getTypeParamList(), clang::ObjCCategoryDecl::IsClassExtension(), clang::ObjCInterfaceDecl::mergeClassExtensionProtocolList(), Previous, clang::Sema::ProcessDeclAttributeList(), clang::Sema::RequireCompleteType(), clang::SemaBase::SemaRef, clang::Decl::setInvalidDecl(), clang::ObjCCategoryDecl::setProtocolList(), and clang::Sema::TUScope.
ObjCImplementationDecl * SemaObjC::ActOnStartClassImplementation | ( | SourceLocation | AtClassImplLoc, |
const IdentifierInfo * | ClassName, | ||
SourceLocation | ClassLoc, | ||
const IdentifierInfo * | SuperClassname, | ||
SourceLocation | SuperClassLoc, | ||
const ParsedAttributesView & | AttrList | ||
) |
Definition at line 1981 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), clang::Sema::AddPragmaAttributes(), CheckObjCDeclScope(), clang::Sema::CorrectTypo(), clang::ObjCImplementationDecl::Create(), clang::ObjCInterfaceDecl::Create(), clang::Sema::CTK_NonError, clang::Sema::CurContext, clang::declaresSameEntity(), clang::SemaBase::Diag(), DiagnoseObjCImplementedDeprecations(), clang::Sema::diagnoseTypo(), clang::Sema::forRedeclarationInCurContext(), clang::SemaBase::getASTContext(), clang::TypoCorrection::getCorrectionDeclAs(), clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getImplementation(), clang::Decl::getLocation(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Decl::hasAttr(), clang::ObjCInterfaceDecl::hasDefinition(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::SemaBase::PDiag(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::PushOnScopeChains(), clang::Sema::RequireCompleteType(), clang::SemaBase::SemaRef, clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::ObjCInterfaceDecl::setImplementation(), clang::Decl::setInvalidDecl(), clang::ObjCInterfaceDecl::setSuperClass(), clang::ObjCInterfaceDecl::startDefinition(), and clang::Sema::TUScope.
ObjCInterfaceDecl * SemaObjC::ActOnStartClassInterface | ( | Scope * | S, |
SourceLocation | AtInterfaceLoc, | ||
IdentifierInfo * | ClassName, | ||
SourceLocation | ClassLoc, | ||
ObjCTypeParamList * | typeParamList, | ||
IdentifierInfo * | SuperName, | ||
SourceLocation | SuperLoc, | ||
ArrayRef< ParsedType > | SuperTypeArgs, | ||
SourceRange | SuperTypeArgsRange, | ||
Decl *const * | ProtoRefs, | ||
unsigned | NumProtoRefs, | ||
const SourceLocation * | ProtoLocs, | ||
SourceLocation | EndProtoLoc, | ||
const ParsedAttributesView & | AttrList, | ||
SkipBodyInfo * | SkipBody | ||
) |
Definition at line 974 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), ActOnSuperClassOfClassInterface(), clang::Sema::AddPragmaAttributes(), CheckObjCDeclScope(), clang::SkipBodyInfo::CheckSameAsPrevious, checkTypeParamListConsistency(), clang::ObjCTypeParamDecl::Create(), clang::ObjCTypeParamList::create(), clang::ObjCInterfaceDecl::Create(), clang::Sema::CurContext, clang::SemaBase::Diag(), diagnoseUseOfProtocols(), clang::Sema::forRedeclarationInCurContext(), clang::SemaBase::getASTContext(), clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ObjCInterfaceDecl::getTypeParamList(), clang::ObjCInterfaceDecl::hasDefinition(), clang::Sema::hasVisibleDefinition(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::Sema::mergeDeclAttributes(), clang::SkipBodyInfo::New, clang::SkipBodyInfo::Previous, clang::Sema::ProcessAPINotes(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::PushOnScopeChains(), clang::SemaBase::SemaRef, clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::Decl::setInvalidDecl(), clang::ObjCInterfaceDecl::setProtocolList(), clang::ObjCInterfaceDecl::startDefinition(), clang::ObjCInterfaceDecl::startDuplicateDefinitionForComparison(), and clang::Sema::TUScope.
ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST.
Definition at line 369 of file SemaDeclObjC.cpp.
References clang::Sema::applyFunctionAttributesBeforeParsingBody(), clang::Sema::CheckParmsForFunctionDef(), clang::ObjCMethodDecl::createImplicitParams(), D, clang::SemaBase::Diag(), DiagnoseObjCImplementedDeprecations(), clang::Sema::ExprEvalContexts, clang::LangOptionsBase::GCOnly, clang::SemaBase::getASTContext(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), clang::Sema::getCurFunction(), clang::Sema::getCurMethodDecl(), clang::Decl::getDeclContext(), clang::ASTContext::getLangOpts(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::ObjCInterfaceDecl::getSuperClass(), clang::Decl::hasAttr(), HasExplicitOwnershipAttr(), clang::Sema::ImplicitlyRetainedSelfLocs, clang::Type::isDependentType(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), clang::ObjCMethodDecl::isInstanceMethod(), clang::Decl::isInvalidDecl(), clang::Type::isVoidType(), clang::LangOptionsBase::NonGC, clang::sema::FunctionScopeInfo::ObjCIsDesignatedInit, clang::sema::FunctionScopeInfo::ObjCIsSecondaryInit, clang::sema::FunctionScopeInfo::ObjCShouldCallSuper, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::ObjCMethodDecl::parameters(), clang::Sema::PushDeclContext(), clang::Sema::PushExpressionEvaluationContext(), clang::Sema::PushFunctionScope(), clang::Sema::PushOnScopeChains(), clang::Sema::RequireCompleteType(), clang::SemaBase::SemaRef, and clang::Decl::setInvalidDecl().
ObjCProtocolDecl * SemaObjC::ActOnStartProtocolInterface | ( | SourceLocation | AtProtoInterfaceLoc, |
IdentifierInfo * | ProtocolName, | ||
SourceLocation | ProtocolLoc, | ||
Decl *const * | ProtoRefNames, | ||
unsigned | NumProtoRefs, | ||
const SourceLocation * | ProtoLocs, | ||
SourceLocation | EndProtoLoc, | ||
const ParsedAttributesView & | AttrList, | ||
SkipBodyInfo * | SkipBody | ||
) |
Check then save referenced protocols.
Definition at line 1216 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), clang::Sema::AddPragmaAttributes(), CheckForwardProtocolDeclarationForCircularDependency(), CheckObjCDeclScope(), clang::SkipBodyInfo::CheckSameAsPrevious, clang::ObjCProtocolDecl::Create(), clang::Sema::CurContext, clang::SemaBase::Diag(), diagnoseUseOfProtocols(), clang::Sema::forRedeclarationInCurContext(), clang::SemaBase::getASTContext(), clang::ObjCProtocolDecl::getDefinition(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::Sema::hasVisibleDefinition(), LookupProtocol(), clang::Sema::mergeDeclAttributes(), clang::SkipBodyInfo::New, clang::SkipBodyInfo::Previous, clang::Sema::ProcessAPINotes(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::PushOnScopeChains(), clang::SemaBase::SemaRef, clang::ObjCList< T >::set(), clang::ObjCProtocolDecl::setProtocolList(), clang::ObjCProtocolDecl::startDefinition(), clang::ObjCProtocolDecl::startDuplicateDefinitionForComparison(), and clang::Sema::TUScope.
void SemaObjC::ActOnSuperClassOfClassInterface | ( | Scope * | S, |
SourceLocation | AtInterfaceLoc, | ||
ObjCInterfaceDecl * | IDecl, | ||
IdentifierInfo * | ClassName, | ||
SourceLocation | ClassLoc, | ||
IdentifierInfo * | SuperName, | ||
SourceLocation | SuperLoc, | ||
ArrayRef< ParsedType > | SuperTypeArgs, | ||
SourceRange | SuperTypeArgsRange | ||
) |
Definition at line 553 of file SemaDeclObjC.cpp.
References actOnObjCTypeArgsAndProtocolQualifiers(), clang::Type::castAs(), clang::Sema::CorrectTypo(), clang::Sema::CreateParsedType(), clang::Sema::CTK_ErrorRecovery, clang::declaresSameEntity(), clang::SemaBase::Diag(), clang::Sema::diagnoseTypo(), clang::Sema::DiagnoseUseOfDecl(), clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getASTContext(), clang::SourceRange::getBegin(), clang::NamedDecl::getDeclName(), clang::SourceRange::getEnd(), clang::TypeLoc::getEndLoc(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), clang::Sema::GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::isNull(), clang::Type::isObjCObjectType(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::SemaBase::PDiag(), clang::Sema::RequireCompleteType(), clang::SemaBase::SemaRef, clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::ObjCInterfaceDecl::setSuperClass(), clang::T, and clang::Sema::TUScope.
Referenced by ActOnStartClassInterface().
ExprResult SemaObjC::ActOnSuperMessage | ( | Scope * | S, |
SourceLocation | SuperLoc, | ||
Selector | Sel, | ||
SourceLocation | LBracLoc, | ||
ArrayRef< SourceLocation > | SelectorLocs, | ||
SourceLocation | RBracLoc, | ||
MultiExprArg | Args | ||
) |
Definition at line 2393 of file SemaExprObjC.cpp.
References BuildClassMessage(), BuildInstanceMessage(), clang::Class, clang::SemaBase::Diag(), clang::ExprError(), clang::SemaBase::getASTContext(), clang::ObjCMethodDecl::getClassInterface(), clang::Sema::getCurFunction(), clang::NamedDecl::getDeclName(), clang::ASTContext::getObjCObjectPointerType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::isInstanceMethod(), clang::QualType::isNull(), clang::sema::FunctionScopeInfo::ObjCShouldCallSuper, clang::SemaBase::SemaRef, and tryCaptureObjCSelf().
void SemaObjC::ActOnTypedefedProtocols | ( | SmallVectorImpl< Decl * > & | ProtocolRefs, |
SmallVectorImpl< SourceLocation > & | ProtocolLocs, | ||
IdentifierInfo * | SuperName, | ||
SourceLocation | SuperLoc | ||
) |
ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualified super class and adds them to the list of the protocols.
Definition at line 1115 of file SemaDeclObjC.cpp.
References clang::Type::getAs(), clang::Type::isObjCObjectType(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::SemaBase::SemaRef, clang::T, and clang::Sema::TUScope.
void SemaObjC::AddAnyMethodToGlobalPool | ( | Decl * | D | ) |
AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.
Definition at line 336 of file SemaDeclObjC.cpp.
References AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), D, and clang::ObjCMethodDecl::isInstanceMethod().
void clang::SemaObjC::AddCFAuditedAttribute | ( | Decl * | D | ) |
AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and, if so, consider adding the appropriate attribute.
Definition at line 1447 of file SemaObjC.cpp.
References D, clang::SemaBase::getASTContext(), clang::Preprocessor::getPragmaARCCFCodeAuditedInfo(), Loc, clang::Sema::PP, clang::AttributeCommonInfo::Form::Pragma(), and clang::SemaBase::SemaRef.
Referenced by clang::Sema::ActOnFunctionDeclarator().
|
inline |
AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
Definition at line 540 of file SemaObjC.h.
Referenced by ActOnAtEnd(), AddAnyMethodToGlobalPool(), and ProcessPropertyDecl().
|
inline |
AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool.
This allows us to efficiently associate a selector with a method declaraation for purposes of typechecking messages sent to "id" (where the class of the object is unknown).
Definition at line 534 of file SemaObjC.h.
Referenced by ActOnAtEnd(), AddAnyMethodToGlobalPool(), and ProcessPropertyDecl().
void SemaObjC::addMethodToGlobalList | ( | ObjCMethodList * | List, |
ObjCMethodDecl * | Method | ||
) |
Add the given method to the list of globally-known methods.
Definition at line 3319 of file SemaDeclObjC.cpp.
References clang::AR_Deprecated, clang::Sema::BumpAlloc, clang::Decl::getAvailability(), clang::Decl::getDeclContext(), clang::SemaBase::getLangOpts(), clang::ObjCMethodDecl::isDefined(), clang::Decl::isDeprecated(), isMethodContextSameForKindofLookup(), clang::Decl::isUnavailable(), MatchTwoMethodDeclarations(), Previous, clang::SemaBase::SemaRef, clang::ObjCMethodDecl::setDefined(), clang::ObjCMethodList::setMethod(), and clang::ObjCMethodList::setNext().
Referenced by addMethodsToPool().
void clang::SemaObjC::AddXConsumedAttr | ( | Decl * | D, |
const AttributeCommonInfo & | CI, | ||
Sema::RetainOwnershipKind | K, | ||
bool | IsTemplateInstantiation | ||
) |
Definition at line 1740 of file SemaObjC.cpp.
References clang::Sema::CF, D, clang::SemaBase::getLangOpts(), clang::AttributeCommonInfo::getRange(), clang::ValueDecl::getType(), clang::isValidSubjectOfCFAttribute(), clang::isValidSubjectOfNSAttribute(), clang::isValidSubjectOfOSAttribute(), clang::Sema::NS, and clang::Sema::OS.
Referenced by clang::Sema::InstantiateAttrs(), and ProcessDeclAttribute().
QualType SemaObjC::AdjustParameterTypeForObjCAutoRefCount | ( | QualType | T, |
SourceLocation | NameLoc, | ||
TypeSourceInfo * | TSInfo | ||
) |
Definition at line 5392 of file SemaDeclObjC.cpp.
References clang::Sema::DelayedDiagnostics::add(), clang::Sema::DelayedDiagnostics, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::SemaBase::getLangOpts(), clang::ASTContext::getLifetimeQualifiedType(), clang::Type::getObjCARCImplicitLifetime(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isArrayType(), clang::Type::isObjCLifetimeType(), clang::sema::DelayedDiagnostic::makeForbiddenType(), clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::SemaBase::SemaRef, clang::Sema::DelayedDiagnostics::shouldDelayDiagnostics(), and clang::T.
Referenced by ProcessAPINotes().
void clang::SemaObjC::adornBoolConversionDiagWithTernaryFixit | ( | Expr * | SourceExpr, |
const Sema::SemaDiagnosticBuilder & | Builder | ||
) |
Definition at line 2313 of file SemaObjC.cpp.
References clang::FixItHint::CreateInsertion(), clang::Stmt::getBeginLoc(), clang::Stmt::getEndLoc(), clang::Sema::getLocForEndOfToken(), clang::Expr::IgnoreImplicit(), and clang::SemaBase::SemaRef.
Referenced by clang::Sema::CheckImplicitConversion(), and DiagnoseFloatingImpCast().
bool SemaObjC::AreMultipleMethodsInGlobalPool | ( | Selector | Sel, |
ObjCMethodDecl * | BestMethod, | ||
SourceRange | R, | ||
bool | receiverIdOrClass, | ||
SmallVectorImpl< ObjCMethodDecl * > & | Methods | ||
) |
Definition at line 3552 of file SemaDeclObjC.cpp.
References DiagnoseMultipleMethodInGlobalPool(), clang::SemaObjC::GlobalMethodPool::end(), clang::SemaObjC::GlobalMethodPool::find(), clang::Decl::hasAttr(), clang::ObjCMethodList::hasMoreThanOneDecl(), clang::ObjCMethodDecl::isInstanceMethod(), and MethodPool.
Referenced by BuildInstanceMessage().
void SemaObjC::AtomicPropertySetterGetterRules | ( | ObjCImplDecl * | IMPDecl, |
ObjCInterfaceDecl * | IDecl | ||
) |
AtomicPropertySetterGetterRules - This routine enforces the rule (via warning) when atomic property has one but not the other user-declared setter or getter.
Definition at line 2144 of file SemaObjCProperty.cpp.
References clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::ObjCPropertyImplDecl::Dynamic, E, clang::ObjCImplDecl::FindPropertyImplDecl(), clang::ObjCContainerDecl::getClassMethod(), clang::ObjCContainerDecl::getInstanceMethod(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::Sema::getLocForEndOfToken(), clang::ObjCMethodDecl::isSynthesizedAccessorStub(), clang::ObjCPropertyAttribute::kind_atomic, clang::ObjCPropertyAttribute::kind_nonatomic, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCInterfaceDecl::known_extensions(), clang::LangOptionsBase::NonGC, clang::ObjCContainerDecl::properties(), clang::Property, and clang::SemaBase::SemaRef.
Referenced by ActOnAtEnd().
ExprResult SemaObjC::BuildClassMessage | ( | TypeSourceInfo * | ReceiverTypeInfo, |
QualType | ReceiverType, | ||
SourceLocation | SuperLoc, | ||
Selector | Sel, | ||
ObjCMethodDecl * | Method, | ||
SourceLocation | LBracLoc, | ||
ArrayRef< SourceLocation > | SelectorLocs, | ||
SourceLocation | RBracLoc, | ||
MultiExprArg | ArgsIn, | ||
bool | isImplicit = false |
||
) |
Build an Objective-C class message expression.
This routine takes care of both normal class messages and class messages to the superclass.
ReceiverTypeInfo | Type source information that describes the receiver of this message. This may be NULL, in which case we are sending to the superclass and SuperLoc must be a valid source location. |
ReceiverType | The type of the object receiving the message. When ReceiverTypeInfo is non-NULL, this is the same type as that refers to. For a superclass send, this is the type of the superclass. |
SuperLoc | The location of the "super" keyword in a superclass message. |
Sel | The selector to which the message is being sent. |
Method | The method that this class message is invoking, if already known. |
LBracLoc | The location of the opening square bracket ']'. |
RBracLoc | The location of the closing square bracket ']'. |
ArgsIn | The message arguments. |
Definition at line 2619 of file SemaExprObjC.cpp.
References checkCocoaAPI(), checkFoundationAPI(), CheckMessageArgumentTypes(), clang::Class, clang::CPlusPlus, clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), DiagnoseCStringFormatDirectiveInObjCAPI(), clang::Sema::DiagnoseUseOfDecl(), clang::ExprError(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::SourceRange::getBegin(), clang::ObjCMethodDecl::getClassInterface(), clang::Sema::getCurMethodDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCObjectType::getInterface(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::NamedDecl::getName(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCMethodDecl::getReturnType(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), clang::ObjCMethodDecl::isDirectMethod(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), Loc, LookupFactoryMethodInGlobalPool(), clang::Sema::MaybeBindToTemporary(), clang::OMF_initialize, clang::Sema::RequireCompleteType(), clang::Result, clang::SemaBase::SemaRef, and clang::VK_PRValue.
Referenced by ActOnClassMessage(), ActOnSuperMessage(), BuildClassMessageImplicit(), and clang::TreeTransform< Derived >::RebuildObjCMessageExpr().
ExprResult SemaObjC::BuildClassMessageImplicit | ( | QualType | ReceiverType, |
bool | isSuperReceiver, | ||
SourceLocation | Loc, | ||
Selector | Sel, | ||
ObjCMethodDecl * | Method, | ||
MultiExprArg | Args | ||
) |
Definition at line 2443 of file SemaExprObjC.cpp.
References BuildClassMessage(), clang::SemaBase::getASTContext(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::QualType::isNull(), clang::SourceLocation::isValid(), and Loc.
Referenced by CheckObjCBridgeRelatedConversions().
ExprResult SemaObjC::BuildInstanceMessage | ( | Expr * | Receiver, |
QualType | ReceiverType, | ||
SourceLocation | SuperLoc, | ||
Selector | Sel, | ||
ObjCMethodDecl * | Method, | ||
SourceLocation | LBracLoc, | ||
ArrayRef< SourceLocation > | SelectorLocs, | ||
SourceLocation | RBracLoc, | ||
MultiExprArg | ArgsIn, | ||
bool | isImplicit = false |
||
) |
Build an Objective-C instance message expression.
This routine takes care of both normal instance messages and instance messages to the superclass instance.
Receiver | The expression that computes the object that will receive this message. This may be empty, in which case we are sending to the superclass instance and SuperLoc must be a valid source location. |
ReceiverType | The (static) type of the object receiving the message. When a Receiver expression is provided, this is the same type as that expression. For a superclass instance send, this is a pointer to the type of the superclass. |
SuperLoc | The location of the "super" keyword in a superclass instance message. |
Sel | The selector to which the message is being sent. |
Method | The method that this instance message is invoking, if already known. |
LBracLoc | The location of the opening square bracket ']'. |
RBracLoc | The location of the closing square bracket ']'. |
ArgsIn | The message arguments. |
Definition at line 2844 of file SemaExprObjC.cpp.
References AreMultipleMethodsInGlobalPool(), checkCocoaAPI(), checkFoundationAPI(), checkInitMethod(), CheckMessageArgumentTypes(), CheckObjCCircularContainer(), clang::Sema::CheckPlaceholderExpr(), checkRetainCycles(), CollectMultipleMethodsInGlobalPool(), clang::CPlusPlus, clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), clang::Sema::CurContext, clang::Sema::DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, clang::SemaBase::Diag(), DiagnoseCStringFormatDirectiveInObjCAPI(), clang::Sema::DiagnoseUseOfDecl(), clang::ExprError(), clang::ObjCMethodDecl::findPropertyDecl(), clang::Sema::forceUnknownAnyToType(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Type::getAsObjCInterfacePointerType(), clang::Type::getAsObjCQualifiedClassType(), clang::Type::getAsObjCQualifiedIdType(), clang::SemaBase::getASTContext(), clang::Stmt::getBeginLoc(), clang::ObjCMethodDecl::getClassInterface(), clang::Sema::getCurFunction(), clang::Sema::getCurMethodDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::SemaBase::getDiagnostics(), clang::Sema::getEnclosingFunction(), clang::Expr::getExprLoc(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getMethodFamily(), clang::NamedDecl::getName(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInterfaceType(), clang::QualType::getObjCLifetime(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), clang::Sema::ImpCastExprToType(), clang::Type::isBlockPointerType(), clang::ObjCMethodDecl::isDirectMethod(), clang::ObjCMethodDecl::isInstanceMethod(), clang::Type::isIntegerType(), clang::SourceLocation::isInvalid(), isMethodDeclaredInRootProtocol(), clang::QualType::isNull(), IsNull, clang::Expr::isNullPointerConstant(), clang::Type::isObjCClassOrClassKindOfType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdOrObjectKindOfType(), clang::Type::isObjCIdType(), clang::ASTContext::isObjCNSObjectType(), clang::Type::isObjCQualifiedClassType(), clang::Type::isObjCRetainableType(), clang::Expr::isObjCSelfExpr(), clang::Type::isPointerType(), isSelfExpr(), clang::Expr::isTypeDependent(), clang::Selector::isUnarySelector(), clang::Sema::isUnevaluatedContext(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), clang::ObjCPropertyAttribute::kind_weak, Loc, LookupFactoryMethodInGlobalPool(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), LookupInstanceMethodInGlobalPool(), LookupMethodInQualifiedType(), clang::ObjCInterfaceDecl::lookupPrivateMethod(), clang::Sema::MaybeBindToTemporary(), clang::Expr::NPC_ValueDependentIsNull, clang::sema::FunctionScopeInfo::ObjCIsDesignatedInit, clang::sema::FunctionScopeInfo::ObjCIsSecondaryInit, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::Qualifiers::OCL_Weak, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::Sema::PerformContextuallyConvertToObjCPointer(), clang::sema::FunctionScopeInfo::recordUseOfWeak(), clang::Sema::RequireCompleteType(), clang::Result, clang::Sema::SelectBestMethod(), clang::SemaBase::SemaRef, clang::ASTContext::UnknownAnyTy, and clang::VK_PRValue.
Referenced by ActOnInstanceMessage(), ActOnSuperMessage(), BuildInstanceMessageImplicit(), and clang::TreeTransform< Derived >::RebuildObjCMessageExpr().
ExprResult SemaObjC::BuildInstanceMessageImplicit | ( | Expr * | Receiver, |
QualType | ReceiverType, | ||
SourceLocation | Loc, | ||
Selector | Sel, | ||
ObjCMethodDecl * | Method, | ||
MultiExprArg | Args | ||
) |
Definition at line 2788 of file SemaExprObjC.cpp.
References BuildInstanceMessage(), and Loc.
Referenced by CheckObjCBridgeRelatedConversions().
ExprResult SemaObjC::BuildIvarRefExpr | ( | Scope * | S, |
SourceLocation | Loc, | ||
ObjCIvarDecl * | IV | ||
) |
Definition at line 4873 of file SemaExprObjC.cpp.
References clang::Sema::ActOnIdExpression(), clang::Sema::CurContext, clang::Sema::DefaultLvalueConversion(), clang::SemaBase::Diag(), clang::Sema::DiagnoseUseOfDecl(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::IdentifierTable::get(), clang::SemaBase::getASTContext(), clang::ObjCMethodDecl::getClassInterface(), clang::Sema::getCurFunction(), clang::Sema::getCurMethodDecl(), clang::NamedDecl::getDeclName(), clang::SemaBase::getDiagnostics(), clang::DeclContext::getInnermostBlockDecl(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::QualType::getObjCLifetime(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ObjCIvarDecl::getUsageType(), clang::ASTContext::Idents, clang::Sema::ImplicitlyRetainedSelfLocs, clang::DiagnosticsEngine::isIgnored(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Sema::isUnevaluatedContext(), IvarBacksCurrentMethodAccessor(), Loc, clang::Sema::MarkAnyDeclReferenced(), clang::Qualifiers::OCL_Weak, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::sema::FunctionScopeInfo::recordUseOfWeak(), clang::Result, clang::SemaBase::SemaRef, and clang::UnqualifiedId::setImplicitSelfParam().
Referenced by clang::Sema::ActOnNameClassifiedAsNonType(), and LookupInObjCMethod().
ExprResult SemaObjC::BuildObjCArrayLiteral | ( | SourceRange | SR, |
MultiExprArg | Elements | ||
) |
Definition at line 801 of file SemaExprObjC.cpp.
References ArrayWithObjectsMethod, clang::Type::castAs(), CheckObjCCollectionLiteralElement(), clang::ParmVarDecl::Create(), clang::ObjCMethodDecl::Create(), clang::ObjCArrayLiteral::Create(), clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::SourceRange::getBegin(), clang::SemaBase::getLangOpts(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::PointerType::getPointeeType(), getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::Idents, clang::ActionResult< PtrTy, Compress >::isInvalid(), LK_Array, Loc, clang::ObjCInterfaceDecl::lookupClassMethod(), LookupObjCInterfaceDeclForLiteral(), clang::Sema::MaybeBindToTemporary(), NSAPIObj, clang::NSAPI::NSArr_arrayWithObjectsCount, NSArrayDecl, clang::ObjCMethodDecl::parameters(), clang::Required, clang::SC_None, clang::SemaBase::SemaRef, clang::ObjCMethodDecl::setMethodParams(), clang::T, clang::ASTContext::UnsignedLongTy, validateBoxingMethod(), and clang::QualType::withConst().
Referenced by clang::TreeTransform< Derived >::RebuildObjCArrayLiteral().
StmtResult clang::SemaObjC::BuildObjCAtThrowStmt | ( | SourceLocation | AtLoc, |
Expr * | Throw | ||
) |
Definition at line 243 of file SemaObjC.cpp.
References clang::Sema::ActOnFinishFullExpr(), clang::Sema::DefaultLvalueConversion(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isDependentType(), clang::Type::isObjCObjectPointerType(), clang::Type::isVoidType(), clang::Result, clang::SemaBase::SemaRef, and clang::StmtError().
Referenced by ActOnObjCAtThrowStmt(), and clang::TreeTransform< Derived >::RebuildObjCAtThrowStmt().
ExprResult SemaObjC::BuildObjCBoxedExpr | ( | SourceRange | SR, |
Expr * | ValueExpr | ||
) |
BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression.
The type of the expression will either be "NSNumber *", "NSString *" or "NSValue *" depending on the type of ValueType, which is allowed to be a built-in numeric type, "char *", "const char *" or C structure with attribute 'objc_boxable'.
Definition at line 510 of file SemaExprObjC.cpp.
References clang::Ascii, bytes(), clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, clang::ParmVarDecl::Create(), clang::ObjCMethodDecl::Create(), clang::Sema::DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, clang::SemaBase::Diag(), clang::Sema::DiagnoseUseOfDecl(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::ASTContext::getAttributedType(), clang::SourceRange::getBegin(), clang::Expr::getExprLoc(), clang::SemaBase::getLangOpts(), getNSNumberFactoryMethod(), clang::Type::getNullability(), clang::AttributedType::getNullabilityAttrKind(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ObjCMethodDecl::getReturnType(), clang::SelectorTable::getSelector(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::getWideCharType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::Idents, clang::Expr::IgnoreParens(), clang::InitializedEntity::InitializeParameter(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isBuiltinType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isObjCBoxableRecordType(), clang::QualType::isTriviallyCopyableType(), clang::Expr::isTypeDependent(), LK_Boxed, LK_String, Loc, clang::ObjCInterfaceDecl::lookupClassMethod(), LookupObjCInterfaceDeclForLiteral(), clang::Sema::MaybeBindToTemporary(), clang::NonNull, NSNumberPointer, NSStringDecl, NSStringPointer, NSValueDecl, NSValuePointer, clang::ObjCMethodDecl::parameters(), clang::Sema::PerformCopyInitialization(), clang::Required, clang::SC_None, clang::ASTContext::Selectors, clang::SemaBase::SemaRef, clang::ObjCMethodDecl::setMethodParams(), StringWithUTF8StringMethod, clang::ast_matchers::type, clang::UTF16, clang::UTF32, clang::UTF8, validateBoxingMethod(), ValueWithBytesObjCTypeMethod, clang::ASTContext::VoidPtrTy, clang::Wide, and clang::CanQual< T >::withConst().
Referenced by clang::TreeTransform< Derived >::RebuildObjCBoxedExpr().
ExprResult SemaObjC::BuildObjCBridgedCast | ( | SourceLocation | LParenLoc, |
ObjCBridgeCastKind | Kind, | ||
SourceLocation | BridgeKeywordLoc, | ||
TypeSourceInfo * | TSInfo, | ||
Expr * | SubExpr | ||
) |
Definition at line 4653 of file SemaExprObjC.cpp.
References clang::Sema::Cleanup, clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getASTContext(), clang::Stmt::getSourceRange(), clang::TypeLoc::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isBlockPointerType(), clang::Type::isCARCBridgableType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isKnownName(), clang::Type::isObjCARCBridgableType(), clang::Expr::isTypeDependent(), maybeUndoReclaimObject(), clang::OBC_Bridge, clang::OBC_BridgeRetained, clang::OBC_BridgeTransfer, clang::Result, clang::SemaBase::SemaRef, clang::CleanupInfo::setExprNeedsCleanups(), clang::T, clang::Sema::UsualUnaryConversions(), and clang::VK_PRValue.
Referenced by ActOnObjCBridgedCast().
ExprResult SemaObjC::BuildObjCDictionaryLiteral | ( | SourceRange | SR, |
MutableArrayRef< ObjCDictionaryElement > | Elements | ||
) |
Definition at line 961 of file SemaExprObjC.cpp.
References clang::ParmVarDecl::Create(), clang::ObjCMethodDecl::Create(), clang::SemaBase::Diag(), DictionaryWithObjectsMethod, clang::ExprError(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::SourceRange::getBegin(), clang::SemaBase::getLangOpts(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getObjCObjectType(), clang::PointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::Idents, clang::Type::isIntegerType(), clang::QualType::isNull(), LK_Dictionary, Loc, clang::ObjCInterfaceDecl::lookupClassMethod(), LookupObjCInterfaceDeclForLiteral(), LookupProtocol(), NSAPIObj, clang::NSAPI::NSDict_dictionaryWithObjectsForKeysCount, NSDictionaryDecl, clang::ASTContext::ObjCBuiltinIdTy, clang::ObjCMethodDecl::parameters(), QIDNSCopying, clang::Required, clang::SC_None, clang::SemaBase::SemaRef, clang::ObjCMethodDecl::setMethodParams(), clang::ASTContext::UnsignedLongTy, validateBoxingMethod(), and clang::QualType::withConst().
Referenced by clang::TreeTransform< Derived >::RebuildObjCDictionaryLiteral().
ExprResult SemaObjC::BuildObjCEncodeExpression | ( | SourceLocation | AtLoc, |
TypeSourceInfo * | EncodedTypeInfo, | ||
SourceLocation | RParenLoc | ||
) |
Definition at line 1136 of file SemaExprObjC.cpp.
References clang::ASTContext::CharTy, clang::ASTContext::DependentTy, clang::SemaBase::Diag(), clang::ExprError(), clang::Type::getAsArrayTypeUnsafe(), clang::SemaBase::getASTContext(), clang::ASTContext::getObjCEncodingForType(), clang::ASTContext::getStringLiteralArrayType(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isVoidType(), clang::Sema::RequireCompleteType(), and clang::SemaBase::SemaRef.
Referenced by ParseObjCEncodeExpression(), and clang::TreeTransform< Derived >::RebuildObjCEncodeExpr().
VarDecl * SemaObjC::BuildObjCExceptionDecl | ( | TypeSourceInfo * | TInfo, |
QualType | ExceptionType, | ||
SourceLocation | StartLoc, | ||
SourceLocation | IdLoc, | ||
const IdentifierInfo * | Id, | ||
bool | Invalid = false |
||
) |
Build a type-check a new Objective-C exception variable declaration.
Definition at line 5155 of file SemaDeclObjC.cpp.
References clang::Type::castAs(), clang::VarDecl::Create(), clang::Sema::CurContext, clang::Default, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::ObjCObjectPointerType::getInterfaceType(), clang::SemaBase::getLangOpts(), Id, inferObjCARCLifetime(), clang::Invalid, clang::Type::isDependentType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedIdType(), clang::SC_None, clang::SemaBase::SemaRef, clang::VarDecl::setExceptionVariable(), clang::Decl::setInvalidDecl(), and clang::T.
Referenced by ActOnObjCExceptionDecl(), and clang::TreeTransform< Derived >::RebuildObjCExceptionDecl().
ExprResult SemaObjC::BuildObjCNumericLiteral | ( | SourceLocation | AtLoc, |
Expr * | Number | ||
) |
BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression.
Type of the expression will be "NSNumber *" or "id" if NSNumber is unavailable.
Type of the expression will be "NSNumber *".
Definition at line 323 of file SemaExprObjC.cpp.
References clang::Ascii, clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getASTContext(), clang::SourceRange::getEnd(), getNSNumberFactoryMethod(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getWideCharType(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Sema::MaybeBindToTemporary(), NSNumberPointer, clang::ObjCMethodDecl::parameters(), clang::Sema::PerformCopyInitialization(), clang::SemaBase::SemaRef, clang::UTF16, clang::UTF32, clang::UTF8, and clang::Wide.
Referenced by ActOnObjCBoolLiteral(), CheckConversionToObjCLiteral(), and CheckObjCCollectionLiteralElement().
QualType clang::SemaObjC::BuildObjCObjectType | ( | QualType | BaseType, |
SourceLocation | Loc, | ||
SourceLocation | TypeArgsLAngleLoc, | ||
ArrayRef< TypeSourceInfo * > | TypeArgs, | ||
SourceLocation | TypeArgsRAngleLoc, | ||
SourceLocation | ProtocolLAngleLoc, | ||
ArrayRef< ObjCProtocolDecl * > | Protocols, | ||
ArrayRef< SourceLocation > | ProtocolLocs, | ||
SourceLocation | ProtocolRAngleLoc, | ||
bool | FailOnError, | ||
bool | Rebuilding | ||
) |
Build an Objective-C object pointer type.
Definition at line 712 of file SemaObjC.cpp.
References clang::applyObjCTypeArgs(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), Loc, clang::Result, and clang::SemaBase::SemaRef.
Referenced by actOnObjCTypeArgsAndProtocolQualifiers(), and clang::TreeTransform< Derived >::RebuildObjCObjectType().
ExprResult SemaObjC::BuildObjCStringLiteral | ( | SourceLocation | AtLoc, |
StringLiteral * | S | ||
) |
Definition at line 86 of file SemaExprObjC.cpp.
References CheckObjCString(), clang::NSAPI::ClassId_NSString, clang::ObjCInterfaceDecl::Create(), clang::SemaBase::Diag(), clang::IdentifierTable::get(), clang::SemaBase::getASTContext(), clang::SemaBase::getLangOpts(), clang::ASTContext::getObjCConstantStringInterface(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCNSStringType(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::Idents, clang::QualType::isNull(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), NSAPIObj, clang::SemaBase::SemaRef, clang::ASTContext::setObjCConstantStringInterface(), clang::ASTContext::setObjCNSStringType(), and clang::Sema::TUScope.
Referenced by CheckConversionToObjCLiteral(), CheckObjCCollectionLiteralElement(), and ParseObjCStringLiteral().
ExprResult SemaObjC::BuildObjCSubscriptExpression | ( | SourceLocation | RB, |
Expr * | BaseExpr, | ||
Expr * | IndexExpr, | ||
ObjCMethodDecl * | getterMethod, | ||
ObjCMethodDecl * | setterMethod | ||
) |
Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime.
Definition at line 771 of file SemaExprObjC.cpp.
References clang::Sema::CheckPlaceholderExpr(), clang::Sema::DefaultLvalueConversion(), clang::ExprError(), clang::SemaBase::getASTContext(), clang::SemaBase::getLangOpts(), clang::Expr::isTypeDependent(), clang::OK_ObjCSubscript, clang::ASTContext::PseudoObjectTy, clang::Result, clang::SemaBase::SemaRef, and clang::VK_LValue.
Referenced by clang::Sema::CreateBuiltinArraySubscriptExpr(), and clang::TreeTransform< Derived >::RebuildObjCSubscriptRefExpr().
QualType clang::SemaObjC::BuildObjCTypeParamType | ( | const ObjCTypeParamDecl * | Decl, |
SourceLocation | ProtocolLAngleLoc, | ||
ArrayRef< ObjCProtocolDecl * > | Protocols, | ||
ArrayRef< SourceLocation > | ProtocolLocs, | ||
SourceLocation | ProtocolRAngleLoc, | ||
bool | FailOnError = false |
||
) |
Build an Objective-C type parameter type.
Definition at line 485 of file SemaObjC.cpp.
References clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), and clang::Result.
Referenced by clang::TreeTransform< Derived >::RebuildObjCTypeParamType().
bool SemaObjC::CheckARCMethodDecl | ( | ObjCMethodDecl * | method | ) |
Check a method declaration for compatibility with the Objective-C ARC conventions.
Definition at line 231 of file SemaDeclObjC.cpp.
References clang::Decl::addAttr(), checkInitMethod(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getReturnTypeSourceRange(), clang::ObjCMethodDecl::getSelectorLoc(), clang::Decl::hasAttr(), clang::ASTContext::hasSameType(), clang::SourceRange::isInvalid(), clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, and clang::ASTContext::VoidTy.
Referenced by ActOnMethodDeclaration(), and ProcessPropertyDecl().
void clang::SemaObjC::checkArrayLiteral | ( | QualType | TargetType, |
ObjCArrayLiteral * | ArrayLiteral | ||
) |
Check an Objective-C array literal being converted to the given target type.
Definition at line 2357 of file SemaObjC.cpp.
References clang::checkCollectionLiteralElement(), clang::Type::getAs(), clang::ObjCInterfaceDecl::getCanonicalDecl(), clang::ObjCArrayLiteral::getElement(), clang::ObjCArrayLiteral::getNumElements(), clang::ObjCObjectPointerType::getTypeArgs(), NSArrayDecl, and clang::SemaBase::SemaRef.
Referenced by clang::checkCollectionLiteralElement(), and clang::Sema::CheckImplicitConversion().
void SemaObjC::CheckCategoryVsClassMethodMatches | ( | ObjCCategoryImplDecl * | CatIMP | ) |
CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those implemented in its primary class and warns each time an exact match is found.
Definition at line 2943 of file SemaDeclObjC.cpp.
References clang::ObjCContainerDecl::class_methods(), clang::ObjCCategoryImplDecl::getCategoryDecl(), clang::ObjCCategoryDecl::getClassInterface(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCContainerDecl::instance_methods(), clang::ObjCInterfaceDecl::lookupMethod(), and MatchAllMethodDeclarations().
Referenced by ImplMethodsVsClassMethods().
void SemaObjC::CheckConflictingOverridingMethod | ( | ObjCMethodDecl * | Method, |
ObjCMethodDecl * | Overridden, | ||
bool | IsProtocolMethodDecl | ||
) |
Definition at line 2611 of file SemaDeclObjC.cpp.
References CheckMethodOverrideParam(), CheckMethodOverrideReturn(), clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), and clang::SemaBase::SemaRef.
Referenced by CheckObjCMethodOverrides().
bool SemaObjC::CheckConversionToObjCLiteral | ( | QualType | DstType, |
Expr *& | SrcExpr, | ||
bool | Diagnose = true |
||
) |
Definition at line 5083 of file SemaExprObjC.cpp.
References BuildObjCNumericLiteral(), BuildObjCStringLiteral(), clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::Stmt::getBeginLoc(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::SemaBase::getLangOpts(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::isNullPointerConstant(), clang::ObjCObjectPointerType::isObjCIdType(), clang::Expr::NPC_NeverValueDependent, and clang::ObjC.
Referenced by CheckObjCConversion(), and clang::InitializationSequence::InitializeFrom().
void clang::SemaObjC::checkDictionaryLiteral | ( | QualType | TargetType, |
ObjCDictionaryLiteral * | DictionaryLiteral | ||
) |
Check an Objective-C dictionary literal being converted to the given target type.
Definition at line 2382 of file SemaObjC.cpp.
References clang::checkCollectionLiteralElement(), clang::Type::getAs(), clang::ObjCInterfaceDecl::getCanonicalDecl(), clang::ObjCDictionaryLiteral::getKeyValueElement(), clang::ObjCDictionaryLiteral::getNumElements(), clang::ObjCObjectPointerType::getTypeArgs(), NSDictionaryDecl, and clang::SemaBase::SemaRef.
Referenced by clang::checkCollectionLiteralElement(), and clang::Sema::CheckImplicitConversion().
bool SemaObjC::CheckForwardProtocolDeclarationForCircularDependency | ( | IdentifierInfo * | PName, |
SourceLocation & | PLoc, | ||
SourceLocation | PrevLoc, | ||
const ObjCList< ObjCProtocolDecl > & | PList | ||
) |
Definition at line 1191 of file SemaDeclObjC.cpp.
References clang::ObjCList< T >::begin(), CheckForwardProtocolDeclarationForCircularDependency(), clang::SemaBase::Diag(), E, clang::ObjCList< T >::end(), and LookupProtocol().
Referenced by ActOnStartProtocolInterface(), and CheckForwardProtocolDeclarationForCircularDependency().
void SemaObjC::CheckImplementationIvars | ( | ObjCImplementationDecl * | ImpDecl, |
ObjCIvarDecl ** | Fields, | ||
unsigned | nIvars, | ||
SourceLocation | Loc | ||
) |
CheckImplementationIvars - This routine checks if the instance variables listed in the implelementation match those listed in the interface.
Check case of non-existing @interface decl. (legacy objective-c @implementation decl without an @interface decl). Add implementations's ivar to the synthesize class's ivar list.
Definition at line 2136 of file SemaDeclObjC.cpp.
References clang::DeclContext::addDecl(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Stmt::getBeginLoc(), clang::FieldDecl::getBitWidth(), clang::FieldDecl::getBitWidthValue(), clang::ObjCImplDecl::getClassInterface(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getIvarDecl(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::ObjCImplementationDecl::getSuperClass(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::FieldDecl::isBitField(), clang::ObjCRuntime::isFragile(), clang::ObjCInterfaceDecl::isImplicitInterfaceDecl(), clang::ObjCRuntime::isNonFragile(), clang::ObjCInterfaceDecl::ivar_begin(), clang::ObjCInterfaceDecl::ivar_end(), clang::DeclContext::makeDeclVisibleInContext(), clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::Decl::setLexicalDeclContext(), and clang::ObjCInterfaceDecl::visible_extensions().
Referenced by clang::Sema::ActOnFields().
bool SemaObjC::checkInitMethod | ( | ObjCMethodDecl * | method, |
QualType | receiverTypeIfCall | ||
) |
Check whether the given method, which must be in the 'init' family, is a valid member of that family.
receiverTypeIfCall | - if null, check this as if declaring it; if non-null, check this as if making a call to it with the given receiver type |
Definition at line 45 of file SemaDeclObjC.cpp.
References clang::Decl::addAttr(), clang::Type::castAs(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::ObjCMethodDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), getObjectType(), clang::ObjCMethodDecl::getReturnType(), clang::Sema::getSourceManager(), clang::ObjCInterfaceDecl::hasDefinition(), clang::SourceManager::isInSystemHeader(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::ObjCObjectType::isObjCClass(), clang::ObjCObjectType::isObjCId(), clang::ObjCInterfaceDecl::isSuperClassOf(), clang::SemaBase::SemaRef, and clang::Decl::setInvalidDecl().
Referenced by BuildInstanceMessage(), and CheckARCMethodDecl().
SemaObjC::ObjCLiteralKind SemaObjC::CheckLiteralKind | ( | Expr * | FromE | ) |
Definition at line 5210 of file SemaExprObjC.cpp.
References clang::Stmt::getStmtClass(), clang::Expr::IgnoreParenImpCasts(), LK_Array, LK_Block, LK_Boxed, LK_Dictionary, LK_None, LK_Numeric, and LK_String.
Referenced by checkUnsafeAssignLiteral(), and diagnoseObjCLiteralComparison().
bool SemaObjC::CheckMessageArgumentTypes | ( | const Expr * | Receiver, |
QualType | ReceiverType, | ||
MultiExprArg | Args, | ||
Selector | Sel, | ||
ArrayRef< SourceLocation > | SelectorLocs, | ||
ObjCMethodDecl * | Method, | ||
bool | isClassMessage, | ||
bool | isSuperMessage, | ||
SourceLocation | lbrac, | ||
SourceLocation | rbrac, | ||
SourceRange | RecRange, | ||
QualType & | ReturnType, | ||
ExprValueKind & | VK | ||
) |
CheckMessageArgumentTypes - Check types in an Obj-C message send.
Method | - May be null. | |
[out] | ReturnType | - The return type of the send. |
Definition at line 1726 of file SemaExprObjC.cpp.
References CheckObjCMethodCall(), clang::Sema::checkUnknownAnyArg(), clang::FixItHint::CreateReplacement(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::SemaBase::Diag(), clang::Sema::DiagnoseSentinelCalls(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), clang::Selector::getAsString(), clang::SemaBase::getASTContext(), clang::SourceRange::getBegin(), clang::Decl::getDeclContext(), clang::SemaBase::getLangOpts(), getMessageSendResultType(), clang::Selector::getNumArgs(), clang::ASTContext::getObjCIdType(), clang::Type::getObjCSubstitutions(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::Stmt::getSourceRange(), clang::ObjCMethodDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getValueKindForType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParenNoopCasts(), clang::InitializedEntity::InitializeParameter(), clang::Type::isBlockPointerType(), clang::SourceRange::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isObjCObjectPointerType(), clang::Selector::isUnarySelector(), clang::ObjCMethodDecl::isVariadic(), clang::Sema::maybeExtendBlockObject(), clang::ObjCMethodDecl::param_size(), clang::Parameter, clang::ObjCMethodDecl::parameters(), clang::Sema::PerformCopyInitialization(), clang::Sema::RequireCompleteType(), SelectorsForTypoCorrection(), clang::SemaBase::SemaRef, clang::ValueDecl::setType(), stripARCUnbridgedCast(), clang::QualType::substObjCTypeArgs(), clang::ASTContext::UnknownAnyTy, clang::Sema::VariadicMethod, and clang::VK_PRValue.
Referenced by BuildClassMessage(), and BuildInstanceMessage().
bool clang::SemaObjC::checkNSReturnsRetainedReturnType | ( | SourceLocation | loc, |
QualType | type | ||
) |
Definition at line 1798 of file SemaObjC.cpp.
References clang::SemaBase::Diag(), clang::isValidSubjectOfNSReturnsRetainedAttribute(), and Loc.
Referenced by clang::Sema::BuildFunctionType(), and handleFunctionTypeAttr().
Definition at line 4598 of file SemaExprObjC.cpp.
References clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::ASTContext::getCanonicalType(), clang::QualType::getObjCLifetime(), clang::CanQual< T >::getUnqualifiedType(), clang::Type::isObjCObjectPointerType(), and clang::Qualifiers::OCL_Weak.
Definition at line 4195 of file SemaExprObjC.cpp.
References ACTC_coreFoundation, ACTC_retainable, clang::ast_matchers::castExpr, CheckObjCBridgeRelatedConversions(), and classifyTypeForARCConversion().
Referenced by clang::Sema::ActOnCastExpr().
bool SemaObjC::checkObjCBridgeRelatedComponents | ( | SourceLocation | Loc, |
QualType | DestType, | ||
QualType | SrcType, | ||
ObjCInterfaceDecl *& | RelatedClass, | ||
ObjCMethodDecl *& | ClassMethod, | ||
ObjCMethodDecl *& | InstanceMethod, | ||
TypedefNameDecl *& | TDNDecl, | ||
bool | CfToNs, | ||
bool | Diagnose = true |
||
) |
Definition at line 4233 of file SemaExprObjC.cpp.
References clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::TypeDecl::getBeginLoc(), clang::LookupResult::getFoundDecl(), clang::SelectorTable::getNullarySelector(), clang::SelectorTable::getUnarySelector(), Loc, clang::ObjCInterfaceDecl::lookupMethod(), clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, ObjCBridgeRelatedAttrFromType(), clang::ASTContext::Selectors, clang::SemaBase::SemaRef, clang::T, and clang::Sema::TUScope.
Referenced by CheckObjCBridgeRelatedConversions().
bool SemaObjC::CheckObjCBridgeRelatedConversions | ( | SourceLocation | Loc, |
QualType | DestType, | ||
QualType | SrcType, | ||
Expr *& | SrcExpr, | ||
bool | Diagnose = true |
||
) |
Definition at line 4305 of file SemaExprObjC.cpp.
References ACTC_coreFoundation, ACTC_retainable, BuildClassMessageImplicit(), BuildInstanceMessageImplicit(), checkObjCBridgeRelatedComponents(), classifyTypeForARCConversion(), clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getASTContext(), clang::TypeDecl::getBeginLoc(), clang::Decl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::Stmt::getEndLoc(), clang::Sema::getLocForEndOfToken(), clang::NamedDecl::getNameAsString(), clang::ASTContext::getObjCInterfaceType(), Loc, and clang::SemaBase::SemaRef.
Referenced by CheckObjCBridgeRelatedCast(), and clang::InitializationSequence::InitializeFrom().
void clang::SemaObjC::CheckObjCCircularContainer | ( | ObjCMessageExpr * | Message | ) |
Check whether receiver is mutable ObjC container which attempts to add itself into the container.
Definition at line 1095 of file SemaObjC.cpp.
References clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::GetNSMutableArrayArgumentIndex(), clang::GetNSMutableDictionaryArgumentIndex(), clang::GetNSSetArgumentIndex(), clang::Expr::IgnoreImpCasts(), and clang::ObjCMessageExpr::SuperInstance.
Referenced by BuildInstanceMessage().
SemaObjC::ARCConversionResult SemaObjC::CheckObjCConversion | ( | SourceRange | castRange, |
QualType | castType, | ||
Expr *& | op, | ||
CheckedConversionKind | CCK, | ||
bool | Diagnose = true , |
||
bool | DiagnoseCFAudited = false , |
||
BinaryOperatorKind | Opc = BO_PtrMemD |
||
) |
Checks for invalid conversions and casts between retainable pointers and other pointer kinds for ARC and Weak.
Definition at line 4401 of file SemaExprObjC.cpp.
References ACR_error, ACR_okay, ACR_unbridged, ACTC_coreFoundation, ACTC_indirectRetainable, ACTC_none, ACTC_retainable, ACTC_voidPtr, clang::ast_matchers::castExpr, CheckConversionToObjCLiteral(), classifyTypeForARCConversion(), clang::Sema::Cleanup, clang::ImplicitCastExpr::Create(), clang::CStyleCast, clang::SemaBase::Diag(), diagnoseObjCARCConversion(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::SourceRange::getBegin(), clang::SemaBase::getLangOpts(), clang::QualType::getObjCLifetime(), clang::Type::getPointeeType(), clang::QualType::getTypePtr(), isAnyCLike(), isAnyRetainable(), clang::Sema::isCast(), clang::Type::isIntegralType(), clang::SourceRange::isValid(), clang::Qualifiers::OCL_None, clang::OtherCast, clang::SemaBase::SemaRef, clang::CleanupInfo::setExprNeedsCleanups(), and clang::VK_PRValue.
Referenced by clang::Sema::CheckCompareOperands(), CheckKeyForObjCARCConversion(), and clang::Sema::PerformImplicitConversion().
Checks that the Objective-C declaration is declared in the global scope.
Emits an error and marks the declaration as invalid if it's not declared in the global scope.
Definition at line 5093 of file SemaDeclObjC.cpp.
References clang::Sema::CurContext, D, clang::SemaBase::Diag(), clang::Sema::getCurLexicalContext(), clang::Decl::getLocation(), clang::DeclContext::getRedeclContext(), clang::SemaBase::SemaRef, and clang::Decl::setInvalidDecl().
Referenced by ActOnCompatibilityAlias(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), and ActOnStartProtocolInterface().
ExprResult clang::SemaObjC::CheckObjCForCollectionOperand | ( | SourceLocation | forLoc, |
Expr * | collection | ||
) |
Definition at line 121 of file SemaObjC.cpp.
References clang::Sema::CorrectDelayedTyposInExpr(), clang::Sema::DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::ObjCObjectType::getInterface(), clang::SemaBase::getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Sema::isCompleteType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), LookupMethodInQualifiedType(), clang::ObjCInterfaceDecl::lookupPrivateMethod(), clang::ast_matchers::pointerType, clang::ObjCProtocolQualifiers< T >::qual_empty(), clang::Sema::RequireCompleteType(), and clang::SemaBase::SemaRef.
Referenced by ActOnObjCForCollectionStmt().
bool clang::SemaObjC::CheckObjCMethodCall | ( | ObjCMethodDecl * | Method, |
SourceLocation | loc, | ||
ArrayRef< const Expr * > | Args | ||
) |
Definition at line 1246 of file SemaObjC.cpp.
References clang::Sema::checkCall(), clang::Sema::CheckTCBEnforcement(), clang::ObjCMethodDecl::getSourceRange(), clang::ObjCMethodDecl::isVariadic(), clang::SemaBase::SemaRef, clang::Sema::VariadicDoesNotApply, and clang::Sema::VariadicMethod.
Referenced by CheckMessageArgumentTypes().
void SemaObjC::CheckObjCMethodDirectOverrides | ( | ObjCMethodDecl * | method, |
ObjCMethodDecl * | overridden | ||
) |
Definition at line 4430 of file SemaDeclObjC.cpp.
References clang::ast_matchers::attr, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), and clang::ObjCMethodDecl::isDirectMethod().
Referenced by CheckObjCMethodOverrides().
void SemaObjC::CheckObjCMethodOverride | ( | ObjCMethodDecl * | NewMethod, |
const ObjCMethodDecl * | Overridden | ||
) |
Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited.
Definition at line 141 of file SemaDeclObjC.cpp.
References clang::SemaBase::Diag(), diagnoseNoescape(), clang::SemaBase::getASTContext(), clang::Decl::getDeclContext(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getReturnTypeSourceRange(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), and clang::SemaBase::SemaRef.
Referenced by clang::Sema::mergeObjCMethodDecls().
void SemaObjC::CheckObjCMethodOverrides | ( | ObjCMethodDecl * | ObjCMethod, |
ObjCInterfaceDecl * | CurrentClass, | ||
ResultTypeCompatibilityKind | RTC | ||
) |
Definition at line 4444 of file SemaDeclObjC.cpp.
References CheckConflictingOverridingMethod(), CheckObjCMethodDirectOverrides(), clang::SemaBase::Diag(), E, clang::SemaObjC::GlobalMethodPool::end(), clang::SemaObjC::GlobalMethodPool::find(), clang::SemaBase::getASTContext(), clang::ObjCInterfaceDecl::getCanonicalDecl(), clang::ASTContext::getCanonicalType(), clang::Decl::getDeclContext(), clang::ObjCMethodDecl::getSelector(), clang::Decl::isImplicit(), clang::ObjCMethodDecl::isInstanceMethod(), clang::Sema::mergeObjCMethodDecls(), MethodPool, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), RTC_Incompatible, clang::SemaBase::SemaRef, clang::ObjCMethodDecl::setOverriding(), clang::ObjCMethodDecl::setRelatedResultType(), and clang::ASTContext::typesAreCompatible().
Referenced by ActOnMethodDeclaration(), and ProcessPropertyDecl().
void SemaObjC::CheckObjCPropertyAttributes | ( | Decl * | PropertyPtrTy, |
SourceLocation | Loc, | ||
unsigned & | Attributes, | ||
bool | propertyInPrimaryClass | ||
) |
Ensure attributes are consistent with type.
[in,out] | Attributes | The attributes to check; they will be modified to be consistent with PropertyTy . |
Definition at line 2619 of file SemaObjCProperty.cpp.
References clang::SemaBase::Diag(), clang::LangOptionsBase::GCOnly, clang::SemaBase::getLangOpts(), clang::Type::getNullability(), getOwnershipRule(), clang::ObjCPropertyDecl::getType(), clang::Decl::hasAttr(), clang::Type::isBlockPointerType(), clang::Decl::isInvalidDecl(), clang::Type::isObjCARCImplicitlyUnretainedType(), clang::Type::isObjCClassType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedClassType(), clang::Type::isObjCRetainableType(), clang::ObjCPropertyAttribute::kind_assign, clang::ObjCPropertyAttribute::kind_atomic, clang::ObjCPropertyAttribute::kind_copy, clang::ObjCPropertyAttribute::kind_nonatomic, clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_retain, clang::ObjCPropertyAttribute::kind_setter, clang::ObjCPropertyAttribute::kind_strong, clang::ObjCPropertyAttribute::kind_unsafe_unretained, clang::ObjCPropertyAttribute::kind_weak, Loc, clang::LangOptionsBase::NonGC, clang::NonNull, clang::Decl::setInvalidDecl(), and clang::ObjCPropertyDecl::setPropertyAttributes().
Referenced by ActOnProperty().
CheckObjCString - Checks that the argument to the builtin CFString constructor is correct Note: It might also make sense to do the UTF-16 conversion here (would simplify the backend).
Definition at line 1218 of file SemaObjC.cpp.
References clang::SemaBase::Diag(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::IgnoreParenCasts(), and clang::Result.
Referenced by BuildObjCStringLiteral().
Check a property assign to see if it's likely to cause a retain cycle.
Definition at line 1191 of file SemaObjC.cpp.
References clang::diagnoseRetainCycle(), clang::findCapturingExpr(), clang::findRetainCycleOwner(), and clang::SemaBase::SemaRef.
void clang::SemaObjC::checkRetainCycles | ( | ObjCMessageExpr * | msg | ) |
checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle.
Check a message send to see if it's likely to cause a retain cycle.
Definition at line 1161 of file SemaObjC.cpp.
References clang::diagnoseRetainCycle(), clang::findCapturingExpr(), clang::findRetainCycleOwner(), clang::ObjCMessageExpr::getArg(), clang::Sema::getCurMethodDecl(), clang::ObjCMessageExpr::getInstanceReceiver(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMessageExpr::getNumArgs(), clang::ObjCMessageExpr::getReceiverKind(), clang::ObjCMessageExpr::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::ObjCMessageExpr::getSuperLoc(), clang::ObjCMessageExpr::Instance, clang::ObjCMessageExpr::isInstanceMessage(), clang::isSetterLikeSelector(), clang::ObjCMethodDecl::parameters(), clang::SemaBase::SemaRef, and clang::ObjCMessageExpr::SuperInstance.
Referenced by clang::Sema::AddInitializerToDecl(), BuildInstanceMessage(), and clang::Sema::CheckAssignmentOperands().
Definition at line 1200 of file SemaObjC.cpp.
References Capturer, clang::considerVariable(), clang::diagnoseRetainCycle(), clang::findCapturingExpr(), clang::Decl::getLocation(), clang::VarDecl::getSourceRange(), clang::Init, and clang::SemaBase::SemaRef.
SemaObjC::ObjCSubscriptKind clang::SemaObjC::CheckSubscriptingKind | ( | Expr * | FromE | ) |
CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being done.
Definition at line 1379 of file SemaObjC.cpp.
References clang::FixItHint::CreateInsertion(), D, clang::SemaBase::Diag(), clang::Type::getAs(), clang::RecordType::getDecl(), clang::Expr::getExprLoc(), clang::SemaBase::getLangOpts(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isBlockPointerType(), clang::Type::isIncompleteType(), clang::Type::isIntegralOrEnumerationType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::Type::isVoidPointerType(), OS_Array, OS_Dictionary, OS_Error, clang::Sema::RequireCompleteType(), clang::SemaBase::SemaRef, and clang::T.
Definition at line 4147 of file SemaExprObjC.cpp.
References ACTC_coreFoundation, ACTC_retainable, clang::ast_matchers::castExpr, classifyTypeForARCConversion(), clang::SemaBase::getLangOpts(), clang::ObjC, and clang::SemaBase::SemaRef.
Referenced by clang::Sema::ActOnCastExpr(), ActOnObjCBridgedCast(), and CheckTollFreeBridgeStaticCast().
bool SemaObjC::CheckTollFreeBridgeStaticCast | ( | QualType | castType, |
Expr * | castExpr, | ||
CastKind & | Kind | ||
) |
Definition at line 4216 of file SemaExprObjC.cpp.
References ACTC_coreFoundation, ACTC_retainable, clang::ast_matchers::castExpr, CheckTollFreeBridgeCast(), classifyTypeForARCConversion(), clang::SemaBase::getLangOpts(), and clang::ObjC.
void SemaObjC::CollectIvarsToConstructOrDestruct | ( | ObjCInterfaceDecl * | OI, |
SmallVectorImpl< ObjCIvarDecl * > & | Ivars | ||
) |
CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.
Definition at line 5260 of file SemaDeclObjC.cpp.
References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), clang::SemaBase::getASTContext(), clang::ASTContext::getBaseElementType(), clang::ObjCIvarDecl::getNextIvar(), and clang::Type::isRecordType().
Referenced by SetIvarInitializers().
bool SemaObjC::CollectMultipleMethodsInGlobalPool | ( | Selector | Sel, |
SmallVectorImpl< ObjCMethodDecl * > & | Methods, | ||
bool | InstanceFirst, | ||
bool | CheckTheOther, | ||
const ObjCObjectType * | TypeBound = nullptr |
||
) |
We first select the type of the method: Instance or Factory, then collect all methods with that type.
Definition at line 3514 of file SemaDeclObjC.cpp.
References clang::SemaObjC::GlobalMethodPool::end(), clang::Sema::ExternalSource, FilterMethodsByTypeBound(), clang::SemaObjC::GlobalMethodPool::find(), clang::ObjCMethodList::getNext(), MethodPool, ReadMethodPool(), and clang::SemaBase::SemaRef.
Referenced by BuildInstanceMessage().
ObjCPropertyDecl * SemaObjC::CreatePropertyDecl | ( | Scope * | S, |
ObjCContainerDecl * | CDecl, | ||
SourceLocation | AtLoc, | ||
SourceLocation | LParenLoc, | ||
FieldDeclarator & | FD, | ||
Selector | GetterSel, | ||
SourceLocation | GetterNameLoc, | ||
Selector | SetterSel, | ||
SourceLocation | SetterNameLoc, | ||
const bool | isReadWrite, | ||
const unsigned | Attributes, | ||
const unsigned | AttributesAsWritten, | ||
QualType | T, | ||
TypeSourceInfo * | TSI, | ||
tok::ObjCKeywordKind | MethodImplKind, | ||
DeclContext * | lexicalDC = nullptr |
||
) |
Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl for a category or @interface.
Definition at line 550 of file SemaObjCProperty.cpp.
References clang::DeclContext::addDecl(), clang::ObjCRuntime::allowsDirectDispatch(), clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::ObjCPropertyDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FieldDeclarator::D, clang::SemaBase::Diag(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::TypeLoc::getBeginLoc(), clang::NamedDecl::getDeclName(), clang::TypeLoc::getEndLoc(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::Sema::getLocForEndOfToken(), clang::ASTContext::getObjCObjectPointerType(), getOwnershipRule(), clang::ObjCPropertyDecl::getQueryKind(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), clang::Decl::hasAttr(), clang::ASTContext::Idents, clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isObjCObjectType(), clang::Type::isObjCRetainableType(), clang::ObjCPropertyAttribute::kind_assign, clang::ObjCPropertyAttribute::kind_atomic, clang::ObjCPropertyAttribute::kind_class, clang::ObjCPropertyAttribute::kind_copy, clang::ObjCPropertyAttribute::kind_direct, clang::ObjCPropertyAttribute::kind_getter, clang::ObjCPropertyAttribute::kind_nonatomic, clang::ObjCPropertyAttribute::kind_null_resettable, clang::ObjCPropertyAttribute::kind_nullability, clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_retain, clang::ObjCPropertyAttribute::kind_setter, clang::ObjCPropertyAttribute::kind_strong, clang::ObjCPropertyAttribute::kind_unsafe_unretained, clang::ObjCPropertyAttribute::kind_weak, LookupProtocol(), makePropertyAttributesAsWritten(), clang::LangOptionsBase::NonGC, clang::ObjCPropertyDecl::Optional, clang::Sema::ProcessDeclAttributes(), clang::ObjCPropertyDecl::Required, clang::SemaBase::SemaRef, clang::ObjCPropertyDecl::setGetterName(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::ObjCPropertyDecl::setPropertyAttributes(), clang::ObjCPropertyDecl::setPropertyAttributesAsWritten(), clang::ObjCPropertyDecl::setPropertyImplementation(), clang::ObjCPropertyDecl::setSetterName(), and clang::T.
Referenced by ActOnProperty(), and HandlePropertyInClassExtension().
void SemaObjC::DefaultSynthesizeProperties | ( | Scope * | S, |
Decl * | D, | ||
SourceLocation | AtEnd | ||
) |
Definition at line 1961 of file SemaObjCProperty.cpp.
References D, DefaultSynthesizeProperties(), clang::ObjCImplDecl::getClassInterface(), clang::SemaBase::getLangOpts(), and clang::ObjCRuntime::isFragile().
void SemaObjC::DefaultSynthesizeProperties | ( | Scope * | S, |
ObjCImplDecl * | IMPDecl, | ||
ObjCInterfaceDecl * | IDecl, | ||
SourceLocation | AtEnd | ||
) |
DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesized in the class's @implementation.
Default synthesizes all properties which must be synthesized in class's @implementation.
Definition at line 1866 of file SemaObjCProperty.cpp.
References ActOnPropertyImplDecl(), clang::ObjCInterfaceDecl::collectPropertiesToImplement(), CollectSuperClassPropertyImplementations(), clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::ObjCImplDecl::FindPropertyImplDecl(), clang::ObjCImplDecl::FindPropertyImplIvarDecl(), clang::SemaBase::getASTContext(), clang::ObjCMethodDecl::getBody(), clang::Decl::getDeclContext(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyImplementation(), clang::ObjCPropertyDecl::getQueryKind(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCContainerDecl::HasUserDeclaredSetterMethod(), clang::ObjCPropertyDecl::isClassProperty(), clang::Decl::isInvalidDecl(), clang::Decl::isUnavailable(), clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyDecl::Optional, and SuperClassImplementsProperty().
Referenced by DefaultSynthesizeProperties().
void SemaObjC::diagnoseARCUnbridgedCast | ( | Expr * | e | ) |
Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly.
Definition at line 4524 of file SemaExprObjC.cpp.
References ACTC_retainable, clang::cast(), clang::ast_matchers::castExpr, classifyTypeForARCConversion(), clang::CStyleCast, diagnoseObjCARCConversion(), clang::QualType::getNonReferenceType(), clang::CastExpr::getSubExpr(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParens(), clang::OtherCast, and clang::SemaBase::SemaRef.
Referenced by clang::Sema::CheckPlaceholderExpr().
void SemaObjC::DiagnoseClassExtensionDupMethods | ( | ObjCCategoryDecl * | CAT, |
ObjCInterfaceDecl * | ID | ||
) |
DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension.
Definition at line 1762 of file SemaDeclObjC.cpp.
References clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isInstanceMethod(), MatchTwoMethodDeclarations(), and clang::ObjCContainerDecl::methods().
Referenced by ActOnAtEnd().
void clang::SemaObjC::DiagnoseCStringFormatDirectiveInCFAPI | ( | const NamedDecl * | FDecl, |
Expr ** | Args, | ||
unsigned | NumArgs | ||
) |
Diagnose use of s directive in an NSString which is being passed as formatting string to formatting method.
Definition at line 2271 of file SemaObjC.cpp.
References clang::SemaBase::Diag(), clang::Sema::FormatStringHasSArg(), clang::NamedDecl::getDeclName(), clang::Expr::getExprLoc(), GetFormatNSStringIdx(), clang::Decl::getLocation(), clang::NamedDecl::getObjCFStringFormattingFamily(), clang::StringLiteral::getString(), clang::Expr::IgnoreParenImpCasts(), clang::SemaBase::SemaRef, clang::SFF_CFString, and clang::Decl::specific_attrs().
Referenced by clang::Sema::CheckFunctionCall().
void SemaObjC::DiagnoseDuplicateIvars | ( | ObjCInterfaceDecl * | ID, |
ObjCInterfaceDecl * | SID | ||
) |
DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementation.
This becomes necessary because class extension can add ivars to a class in random order which will not be known until class's @implementation is seen.
Definition at line 3770 of file SemaDeclObjC.cpp.
References clang::SemaBase::Diag(), clang::Decl::getLocation(), and clang::ObjCInterfaceDecl::lookupInstanceVariable().
Referenced by ActOnAtEnd(), and clang::Sema::ActOnFields().
void SemaObjC::DiagnoseMissingDesignatedInitOverrides | ( | const ObjCImplementationDecl * | ImplD, |
const ObjCInterfaceDecl * | IFD | ||
) |
Definition at line 2298 of file SemaObjCProperty.cpp.
References clang::SemaBase::Diag(), E, clang::ObjCInterfaceDecl::getDesignatedInitializers(), clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getSelector(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCInterfaceDecl::hasDesignatedInitializers(), clang::ObjCContainerDecl::instance_methods(), clang::Decl::isUnavailable(), clang::OMF_init, and clang::ObjCInterfaceDecl::visible_extensions().
Referenced by ActOnAtEnd().
void SemaObjC::DiagnoseMultipleMethodInGlobalPool | ( | SmallVectorImpl< ObjCMethodDecl * > & | Methods, |
Selector | Sel, | ||
SourceRange | R, | ||
bool | receiverIdOrClass | ||
) |
Definition at line 3597 of file SemaDeclObjC.cpp.
References clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::SemaBase::getDiagnostics(), clang::SemaBase::getLangOpts(), isAcceptableMethodMismatch(), clang::DiagnosticsEngine::isIgnored(), MatchTwoMethodDeclarations(), MMS_loose, and MMS_strict.
Referenced by AreMultipleMethodsInGlobalPool().
void SemaObjC::diagnoseNullResettableSynthesizedSetters | ( | const ObjCImplDecl * | impDecl | ) |
Diagnose any null-resettable synthesized setters.
Definition at line 2118 of file SemaObjCProperty.cpp.
References clang::SemaBase::Diag(), clang::Decl::getBeginLoc(), clang::SourceLocation::isInvalid(), clang::ObjCPropertyAttribute::kind_null_resettable, clang::ObjCImplDecl::property_impls(), and clang::ObjCPropertyImplDecl::Synthesize.
Referenced by ImplMethodsVsClassMethods().
void SemaObjC::DiagnoseOwningPropertyGetterSynthesis | ( | const ObjCImplementationDecl * | D | ) |
Definition at line 2238 of file SemaObjCProperty.cpp.
References clang::FixItHint::CreateInsertion(), D, clang::SemaBase::Diag(), clang::LangOptionsBase::GCOnly, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterMethodDecl(), clang::Preprocessor::getIdentifierInfo(), clang::SemaBase::getLangOpts(), clang::Preprocessor::getLastMacroWithSpelling(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::Sema::getPreprocessor(), clang::Decl::hasAttr(), clang::ObjCPropertyDecl::isClassProperty(), clang::ObjCMethodDecl::isSynthesizedAccessorStub(), clang::SourceLocation::isValid(), clang::OMF_alloc, clang::OMF_copy, clang::OMF_mutableCopy, clang::OMF_new, clang::Decl::redecls(), and clang::SemaBase::SemaRef.
Referenced by ActOnAtEnd().
bool SemaObjC::DiagnosePropertyAccessorMismatch | ( | ObjCPropertyDecl * | PD, |
ObjCMethodDecl * | Getter, | ||
SourceLocation | Loc | ||
) |
Definition at line 1687 of file SemaObjCProperty.cpp.
References clang::ASTContext::canAssignObjCInterfaces(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::Compatible, clang::SemaBase::Diag(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::ASTContext::getCanonicalType(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::CanQual< T >::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::Type::isArithmeticType(), Loc, and clang::SemaBase::SemaRef.
Referenced by ProcessPropertyDecl().
void SemaObjC::DiagnosePropertyMismatch | ( | ObjCPropertyDecl * | Property, |
ObjCPropertyDecl * | SuperProperty, | ||
const IdentifierInfo * | Name, | ||
bool | OverridingProtocolProperty | ||
) |
DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a variety of inconsistencies.
Definition at line 1612 of file SemaObjCProperty.cpp.
References checkAtomicPropertyMismatch(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::ASTContext::getCanonicalType(), clang::Decl::getDeclContext(), clang::ObjCPropertyDecl::getGetterName(), clang::Decl::getLocation(), getOwnershipRule(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), clang::Sema::isObjCPointerConversion(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyAttribute::kind_copy, clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_retain, clang::ObjCPropertyAttribute::kind_strong, clang::Property, clang::ASTContext::propertyTypesAreCompatible(), and clang::SemaBase::SemaRef.
Referenced by ActOnProperty(), and CheckPropertyAgainstProtocol().
void SemaObjC::DiagnoseTypeArgsAndProtocols | ( | IdentifierInfo * | ProtocolId, |
SourceLocation | ProtocolLoc, | ||
IdentifierInfo * | TypeArgId, | ||
SourceLocation | TypeArgLoc, | ||
bool | SelectProtocolFirst = false |
||
) |
Definition at line 1416 of file SemaDeclObjC.cpp.
References clang::SemaBase::Diag().
Referenced by actOnObjCTypeArgsOrProtocolQualifiers().
void SemaObjC::DiagnoseUnimplementedProperties | ( | Scope * | S, |
ObjCImplDecl * | IMPDecl, | ||
ObjCContainerDecl * | CDecl, | ||
bool | SynthesizeProperties | ||
) |
DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by this implementation.
Definition at line 2011 of file SemaObjCProperty.cpp.
References clang::ObjCInterfaceDecl::all_referenced_protocols(), clang::AR_Unavailable, clang::C, CollectImmediateProperties(), clang::ObjCInterfaceDecl::collectPropertiesToImplement(), CollectSuperClassPropertyImplementations(), DiagnoseUnimplementedAccessor(), E, clang::Decl::getAvailability(), clang::ObjCPropertyDecl::getGetterName(), clang::ObjCInterfaceDecl::getImplementation(), clang::ObjCPropertyDecl::getPropertyImplementation(), clang::ObjCPropertyDecl::getSetterName(), clang::Decl::isInvalidDecl(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCContainerDecl::methods(), clang::ObjCPropertyDecl::Optional, P, clang::ObjCImplDecl::property_impls(), and clang::SemaBase::SemaRef.
Referenced by ImplMethodsVsClassMethods().
void SemaObjC::DiagnoseUnusedBackingIvarInAccessor | ( | Scope * | S, |
const ObjCImplementationDecl * | ImplD | ||
) |
DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is not used in the property's accessor.
Definition at line 5357 of file SemaDeclObjC.cpp.
References DIAG, clang::SemaBase::Diag(), clang::SemaBase::getDiagnostics(), GetIvarBackingPropertyAccessor(), clang::Decl::getLocation(), clang::ObjCContainerDecl::instance_methods(), clang::Decl::isReferenced(), Loc, and clang::SemaBase::SemaRef.
Referenced by ActOnAtEnd().
void SemaObjC::DiagnoseUseOfUnimplementedSelectors | ( | ) |
Definition at line 5271 of file SemaDeclObjC.cpp.
References clang::ASTContext::AnyObjCImplementation(), clang::SemaBase::Diag(), clang::Sema::ExternalSource, clang::SemaBase::getASTContext(), Loc, LookupImplementedMethodInGlobalPool(), ReferencedSelectors, and clang::SemaBase::SemaRef.
Referenced by clang::Sema::ActOnEndOfTranslationUnit().
void SemaObjC::EmitRelatedResultTypeNote | ( | const Expr * | E | ) |
If the given expression involves a message send to a method with a related result type, emit a note describing what happened.
Definition at line 1699 of file SemaExprObjC.cpp.
References clang::SemaBase::Diag(), E, clang::SemaBase::getASTContext(), clang::Decl::getLocation(), clang::ObjCMessageExpr::getMethodDecl(), clang::QualType::getNonReferenceType(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::Expr::getType(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::IgnoreParenImpCasts(), and clang::ObjCMethodDecl::isInstanceMethod().
Referenced by clang::Sema::DiagnoseAssignmentResult(), emitBadConversionNotes(), and clang::Sema::PerformImplicitConversion().
void SemaObjC::EmitRelatedResultTypeNoteForReturn | ( | QualType | destType | ) |
Given that we had incompatible pointer types in a return statement, check whether we're in a method with a related result type, and if so, emit a note describing what happened.
Definition at line 1669 of file SemaExprObjC.cpp.
References clang::Sema::CurContext, clang::SemaBase::Diag(), findExplicitInstancetypeDeclarer(), clang::SemaBase::getASTContext(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::ASTContext::hasSameUnqualifiedType(), clang::SourceLocation::isInvalid(), and clang::SemaBase::SemaRef.
Referenced by clang::Sema::DiagnoseAssignmentResult(), and emitBadConversionNotes().
QualType SemaObjC::FindCompositeObjCPointerType | ( | ExprResult & | LHS, |
ExprResult & | RHS, | ||
SourceLocation | QuestionLoc | ||
) |
FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types of the two input expressions.
Definition at line 4933 of file SemaExprObjC.cpp.
References clang::ASTContext::areCommonBaseCompatible(), clang::ASTContext::canAssignObjCInterfaces(), clang::Type::castAs(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getASTContext(), clang::ASTContext::getCanonicalType(), clang::SemaBase::getLangOpts(), clang::ASTContext::getObjCClassRedefinitionType(), clang::ASTContext::getObjCIdRedefinitionType(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCSelRedefinitionType(), getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::Sema::ImpCastExprToType(), clang::Type::isObjCBuiltinType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::ObjCObjectPointerType::isObjCQualifiedIdType(), clang::ASTContext::isObjCSelType(), clang::Type::isVoidPointerType(), clang::ASTContext::ObjCQualifiedIdTypesAreCompatible(), and clang::SemaBase::SemaRef.
Referenced by clang::Sema::CheckConditionalOperands(), and clang::Sema::CXXCheckConditionalOperands().
void SemaObjC::FindProtocolDeclaration | ( | bool | WarnOnDeclarations, |
bool | ForObjCContainer, | ||
ArrayRef< IdentifierLocPair > | ProtocolId, | ||
SmallVectorImpl< Decl * > & | Protocols | ||
) |
FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declared.
It returns list of protocol declarations in its 'Protocols' argument.
Definition at line 1311 of file SemaDeclObjC.cpp.
References clang::Sema::CorrectTypo(), clang::Sema::CTK_ErrorRecovery, clang::SemaBase::Diag(), clang::Sema::diagnoseTypo(), clang::Sema::DiagnoseUseOfDecl(), clang::TypoCorrection::getCorrectionDeclAs(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), clang::ObjCProtocolDecl::isThisDeclarationADefinition(), clang::Sema::LookupObjCProtocolName, LookupProtocol(), NestedProtocolHasNoDefinition(), clang::SemaBase::PDiag(), clang::SemaBase::SemaRef, and clang::Sema::TUScope.
StmtResult clang::SemaObjC::FinishObjCForCollectionStmt | ( | Stmt * | ForCollection, |
Stmt * | Body | ||
) |
FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.
Definition at line 198 of file SemaObjC.cpp.
References clang::ForStmt::setBody(), and clang::StmtError().
Referenced by clang::Sema::FinishCXXForRangeStmt(), and clang::TreeTransform< Derived >::RebuildObjCForCollectionStmt().
const DeclContext * clang::SemaObjC::getCurObjCLexicalContext | ( | ) | const |
Definition at line 1260 of file SemaObjC.cpp.
References clang::Sema::getCurLexicalContext(), and clang::SemaBase::SemaRef.
Referenced by DiagnoseUnusedOfDecl().
Definition at line 2259 of file SemaObjC.cpp.
References clang::Sema::FormatStringInfo::FormatIdx, clang::Sema::FST_NSString, clang::Sema::getFormatStringInfo(), clang::Sema::GetFormatStringType(), and clang::SemaBase::SemaRef.
Referenced by DiagnoseCStringFormatDirectiveInCFAPI(), and DiagnoseCStringFormatDirectiveInObjCAPI().
ObjCIvarDecl * SemaObjC::GetIvarBackingPropertyAccessor | ( | const ObjCMethodDecl * | Method, |
const ObjCPropertyDecl *& | PDecl | ||
) | const |
GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ivar, returns this ivar; otherwise, returns NULL.
It also returns ivar's property on success.
Definition at line 5296 of file SemaDeclObjC.cpp.
References clang::ObjCMethodDecl::findPropertyDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCPropertyDecl::getPropertyIvarDecl(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isPropertyAccessor(), and clang::ObjCInterfaceDecl::lookupMethod().
Referenced by DiagnoseUnusedBackingIvarInAccessor().
QualType SemaObjC::getMessageSendResultType | ( | const Expr * | Receiver, |
QualType | ReceiverType, | ||
ObjCMethodDecl * | Method, | ||
bool | isClassMessage, | ||
bool | isSuperMessage | ||
) |
Determine the result of a message send expression based on the type of the receiver, the method expected to receive the message, and the form of the message send.
Definition at line 1532 of file SemaExprObjC.cpp.
References clang::Type::canHaveNullability(), clang::SemaBase::getASTContext(), clang::ASTContext::getAttributedType(), getBaseMessageSendResultType(), clang::ObjCMethodDecl::getClassInterface(), clang::QualType::getDesugaredType(), clang::Type::getNullability(), clang::AttributedType::getNullabilityAttrKind(), clang::ASTContext::getObjCInstanceType(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::ObjCMethodDecl::getSendResultType(), clang::QualType::getTypePtr(), clang::Expr::IgnoreParenImpCasts(), clang::ObjCMethodDecl::isClassMethod(), clang::Type::isObjCClassType(), clang::Expr::isObjCSelfExpr(), clang::None, clang::NonNull, clang::Nullable, clang::NullableResult, clang::SemaBase::SemaRef, clang::AttributedType::stripOuterNullability(), clang::T, and clang::Unspecified.
Referenced by CheckMessageArgumentTypes().
IdentifierInfo * clang::SemaObjC::getNSErrorIdent | ( | ) |
Retrieve the identifier "NSError".
Definition at line 1269 of file SemaObjC.cpp.
References clang::Preprocessor::getIdentifierInfo(), clang::Sema::PP, and clang::SemaBase::SemaRef.
Referenced by clang::checkSwiftAsyncErrorBlock(), classifyPointerDeclarator(), isCFError(), and clang::isErrorParameter().
SemaObjC::ObjCContainerKind SemaObjC::getObjCContainerKind | ( | ) | const |
Definition at line 3823 of file SemaDeclObjC.cpp.
References clang::Sema::CurContext, clang::DeclContext::getDeclKind(), OCK_Category, OCK_CategoryImplementation, OCK_ClassExtension, OCK_Implementation, OCK_Interface, OCK_None, OCK_Protocol, and clang::SemaBase::SemaRef.
Referenced by ActOnAtEnd().
ObjCContainerDecl * SemaObjC::getObjCDeclContext | ( | ) | const |
Definition at line 5495 of file SemaDeclObjC.cpp.
References clang::Sema::CurContext, and clang::SemaBase::SemaRef.
Referenced by clang::Parser::getObjCDeclContext().
ObjCInterfaceDecl * SemaObjC::getObjCInterfaceDecl | ( | const IdentifierInfo *& | Id, |
SourceLocation | IdLoc, | ||
bool | TypoCorrection = false |
||
) |
Look for an Objective-C class in the translation unit.
Id | The name of the Objective-C class we're looking for. If typo-correction fixes this name, the Id will be updated to the fixed name. |
IdLoc | The location of the name in the translation unit. |
DoTypoCorrection | If true, this routine will attempt typo correction if there is no class with the given name. |
Definition at line 5424 of file SemaDeclObjC.cpp.
References clang::C, clang::Sema::CorrectTypo(), clang::Sema::CTK_ErrorRecovery, clang::Sema::diagnoseTypo(), clang::ObjCInterfaceDecl::getDefinition(), clang::NamedDecl::getIdentifier(), Id, clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::SemaBase::PDiag(), clang::SemaBase::SemaRef, and clang::Sema::TUScope.
Referenced by ActOnClassPropertyRefExpr(), ActOnDefs(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), and clang::SemaCodeCompletion::CodeCompleteObjCClassPropertyRefExpr().
SemaObjC::ObjCMessageKind SemaObjC::getObjCMessageKind | ( | Scope * | S, |
IdentifierInfo * | Name, | ||
SourceLocation | NameLoc, | ||
bool | IsSuper, | ||
bool | HasTrailingDot, | ||
ParsedType & | ReceiverType | ||
) |
Definition at line 2297 of file SemaExprObjC.cpp.
References clang::LookupResult::Ambiguous, clang::Class, clang::Sema::CorrectTypo(), clang::Sema::CreateParsedType(), clang::Sema::CTK_ErrorRecovery, clang::Sema::diagnoseTypo(), clang::Sema::DiagnoseUseOfDecl(), clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::SemaBase::getASTContext(), clang::ObjCMethodDecl::getClassInterface(), clang::Sema::getCurMethodDecl(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, ObjCClassMessage, ObjCInstanceMessage, ObjCSuperMessage, clang::SemaBase::PDiag(), clang::Result, clang::SemaBase::SemaRef, and clang::T.
void clang::SemaObjC::handleBlocksAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1702 of file SemaObjC.cpp.
References clang::AANT_ArgumentIdentifier, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::ast_matchers::type.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleBoxable | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 2118 of file SemaObjC.cpp.
References D, clang::SemaBase::getASTContext(), clang::Sema::getASTMutationListener(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleBridgeAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 2026 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::IdentifierInfo::isStr(), clang::Type::isVoidPointerType(), and clang::T.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleBridgeMutableAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 2053 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleBridgeRelatedAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 2065 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleDesignatedInitializer | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 2080 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), and clang::ObjCInterfaceDecl::setHasDesignatedInitializers().
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleDirectAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1613 of file SemaObjC.cpp.
References clang::ObjCRuntime::allowsDirectDispatch(), D, clang::SemaBase::Diag(), clang::SemaBase::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleDirectMembersAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1627 of file SemaObjC.cpp.
References clang::ObjCRuntime::allowsDirectDispatch(), D, clang::SemaBase::Diag(), clang::SemaBase::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
ExprResult SemaObjC::HandleExprPropertyRefExpr | ( | const ObjCObjectPointerType * | OPT, |
Expr * | BaseExpr, | ||
SourceLocation | OpLoc, | ||
DeclarationName | MemberName, | ||
SourceLocation | MemberLoc, | ||
SourceLocation | SuperLoc, | ||
QualType | SuperType, | ||
bool | Super | ||
) |
HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface.
This is a property reference expression.
Definition at line 1990 of file SemaExprObjC.cpp.
References clang::SelectorTable::constructSetterSelector(), clang::Sema::CorrectTypo(), clang::FixItHint::CreateReplacement(), clang::Sema::CTK_ErrorRecovery, clang::SemaBase::Diag(), clang::Sema::diagnoseTypo(), clang::Sema::DiagnoseUseOfDecl(), clang::ExprError(), clang::ObjCMethodDecl::findPropertyDecl(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::DeclarationName::getAsIdentifierInfo(), clang::Type::getAsObjCInterfacePointerType(), clang::SemaBase::getASTContext(), clang::ObjCInterfaceType::getDecl(), clang::Preprocessor::getIdentifierTable(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::ObjCObjectPointerType::getInterfaceType(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::SelectorTable::getNullarySelector(), clang::ObjCObjectPointerType::getPointeeType(), clang::Preprocessor::getSelectorTable(), clang::Stmt::getSourceRange(), HandleExprPropertyRefExpr(), clang::DeclarationName::isIdentifier(), clang::Decl::isImplicit(), clang::ObjCMethodDecl::isPropertyAccessor(), clang::ObjCPropertyAttribute::kind_setter, clang::ObjCInterfaceDecl::lookupInstanceMethod(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), LookupMethodInQualifiedType(), clang::Sema::LookupOrdinaryName, clang::ObjCInterfaceDecl::lookupPrivateMethod(), clang::Member, clang::OBJC_PR_query_instance, clang::OK_ObjCProperty, clang::SemaBase::PDiag(), clang::Sema::PP, clang::ASTContext::PseudoObjectTy, clang::ObjCObjectPointerType::quals(), clang::Sema::RequireCompleteType(), clang::SemaBase::SemaRef, clang::T, and clang::VK_LValue.
Referenced by ActOnClassPropertyRefExpr(), HandleExprPropertyRefExpr(), and LookupMemberExpr().
void clang::SemaObjC::handleExternallyRetainedAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 2223 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParam(), clang::QualType::getLocalUnqualifiedType(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::hasFunctionProto(), clang::Qualifiers::OCL_Strong, clang::SemaBase::SemaRef, and clang::tryMakeVariablePseudoStrong().
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleIBOutlet | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1549 of file SemaObjC.cpp.
References clang::checkIBOutletCommon(), D, clang::SemaBase::getASTContext(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleIBOutletCollection | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1556 of file SemaObjC.cpp.
References clang::checkIBOutletCommon(), D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::Sema::getScopeForContext(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::Sema::getTypeName(), clang::ParsedAttr::hasParsedType(), clang::Type::isBuiltinType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectType(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleIndependentClass | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1687 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Type::isObjCObjectPointerType(), and clang::T.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleMethodFamilyAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1635 of file SemaObjC.cpp.
References clang::AANT_ArgumentIdentifier, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleNSErrorDomain | ( | Decl * | D, |
const ParsedAttr & | Attr | ||
) |
Definition at line 1993 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, clang::IdentifierLoc::Loc, Loc, clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::Result, clang::SemaBase::SemaRef, and clang::Sema::TUScope.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleNSObject | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1662 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Type::isCARCBridgableType(), and clang::T.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleOwnershipAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 2140 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::ExpectedVariable, clang::AttributeCommonInfo::getRange(), clang::hasDeclarator(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handlePreciseLifetimeAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 2149 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), clang::Type::isDependentType(), clang::Type::isObjCLifetimeType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by ProcessDeclAttribute().
ObjCPropertyDecl * SemaObjC::HandlePropertyInClassExtension | ( | Scope * | S, |
SourceLocation | AtLoc, | ||
SourceLocation | LParenLoc, | ||
FieldDeclarator & | FD, | ||
Selector | GetterSel, | ||
SourceLocation | GetterNameLoc, | ||
Selector | SetterSel, | ||
SourceLocation | SetterNameLoc, | ||
const bool | isReadWrite, | ||
unsigned & | Attributes, | ||
const unsigned | AttributesAsWritten, | ||
QualType | T, | ||
TypeSourceInfo * | TSI, | ||
tok::ObjCKeywordKind | MethodImplKind | ||
) |
Called by ActOnProperty to handle @property declarations in class extensions.
Definition at line 404 of file SemaObjCProperty.cpp.
References checkAtomicPropertyMismatch(), CreatePropertyDecl(), clang::Sema::CurContext, clang::FieldDeclarator::D, clang::SemaBase::Diag(), clang::ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::ASTContext::getCanonicalType(), clang::ObjCCategoryDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterName(), clang::Declarator::getIdentifier(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), getOwnershipRule(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::ObjCPropertyDecl::getQueryKind(), clang::ObjCPropertyDecl::getType(), clang::ASTContext::hasSameType(), clang::Sema::isObjCPointerConversion(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyAttribute::kind_class, clang::ObjCPropertyAttribute::kind_getter, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_weak, clang::Qualifiers::OCL_None, ProcessPropertyDecl(), clang::SemaBase::SemaRef, and clang::T.
Referenced by ActOnProperty().
void clang::SemaObjC::handleRequiresSuperAttr | ( | Decl * | D, |
const ParsedAttr & | Attrs | ||
) |
Definition at line 1973 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), and clang::OMF_dealloc.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleReturnsInnerPointerAttr | ( | Decl * | D, |
const ParsedAttr & | Attrs | ||
) |
Definition at line 1947 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::Type::isObjCRetainableType(), clang::Type::isPointerType(), and clang::Type::isReferenceType().
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleRuntimeName | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 2106 of file SemaObjC.cpp.
References clang::Sema::checkStringLiteralArgumentAttr(), D, clang::SemaBase::getASTContext(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleSuppresProtocolAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1602 of file SemaObjC.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::getRange().
Referenced by ProcessDeclAttribute().
void clang::SemaObjC::handleXReturnsXRetainedAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1818 of file SemaObjC.cpp.
References clang::Sema::CF, D, clang::SemaBase::Diag(), clang::ExpectedFunctionMethodOrParameter, clang::ExpectedFunctionOrMethod, clang::Function, clang::ParsedAttr::getKind(), clang::SemaBase::getLangOpts(), clang::Type::getPointeeType(), clang::AttributeCommonInfo::getRange(), clang::hasDeclarator(), clang::QualType::isNull(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::ParsedAttr::isUsedAsTypeAttr(), clang::isValidSubjectOfCFAttribute(), clang::isValidSubjectOfNSAttribute(), clang::isValidSubjectOfNSReturnsRetainedAttribute(), clang::isValidSubjectOfOSAttribute(), parsedAttrToRetainOwnershipKind(), and clang::Property.
Referenced by ProcessDeclAttribute().
void SemaObjC::ImplMethodsVsClassMethods | ( | Scope * | S, |
ObjCImplDecl * | IMPDecl, | ||
ObjCContainerDecl * | IDecl, | ||
bool | IncompleteImpl = false |
||
) |
ImplMethodsVsClassMethods - This is main routine to warn if any method remains unimplemented in the class or category @implementation.
Definition at line 2982 of file SemaDeclObjC.cpp.
References clang::C, CheckCategoryVsClassMethodMatches(), CheckProtocolMethodDefs(), clang::ObjCContainerDecl::class_methods(), diagnoseNullResettableSynthesizedSetters(), DiagnoseUnimplementedProperties(), clang::ObjCPropertyImplDecl::Dynamic, clang::SemaBase::getLangOpts(), clang::ObjCContainerDecl::instance_methods(), clang::ObjCRuntime::isNonFragile(), MatchAllMethodDeclarations(), clang::LangOptions::ObjCRuntime, P, clang::ObjCImplDecl::property_impls(), and clang::SemaBase::SemaRef.
Referenced by ActOnAtEnd().
Definition at line 5451 of file SemaDeclObjC.cpp.
References clang::ast_matchers::decl, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::ASTContext::getLifetimeQualifiedType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, and clang::ast_matchers::type.
Referenced by ActOnIvar(), BuildObjCExceptionDecl(), and FinishForRangeVarDecl().
bool clang::SemaObjC::isCFError | ( | RecordDecl * | D | ) |
Definition at line 1465 of file SemaObjC.cpp.
References CFError, clang::Decl::getAttr(), getNSErrorIdent(), clang::TagDecl::getTagKind(), and clang::Struct.
Referenced by clang::checkSwiftAsyncErrorBlock(), classifyPointerDeclarator(), and clang::isErrorParameter().
Definition at line 1509 of file SemaObjC.cpp.
References clang::IdentifierTable::get(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::NamedDecl::getIdentifier(), clang::PointerType::getPointeeType(), clang::TagDecl::getTagKind(), clang::ASTContext::Idents, clang::Struct, and clang::T.
Referenced by handleFormatArgAttr(), and handleFormatAttr().
bool SemaObjC::isKnownName | ( | StringRef | name | ) |
Definition at line 3751 of file SemaExprObjC.cpp.
References clang::IdentifierTable::get(), clang::SemaBase::getASTContext(), clang::ASTContext::Idents, clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::SemaBase::SemaRef, and clang::Sema::TUScope.
Referenced by BuildObjCBridgedCast(), and diagnoseObjCARCConversion().
Definition at line 1490 of file SemaObjC.cpp.
References clang::IdentifierTable::get(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::NamedDecl::getIdentifier(), clang::ASTContext::Idents, and clang::T.
Referenced by handleFormatArgAttr(), and handleFormatAttr().
Definition at line 409 of file SemaObjC.h.
References D.
bool clang::SemaObjC::isObjCWritebackConversion | ( | QualType | FromType, |
QualType | ToType, | ||
QualType & | ConvertedType | ||
) |
Determine whether this is an Objective-C writeback conversion, used for parameter passing when performing automatic reference counting.
FromType | The type we're converting form. |
ToType | The type we're converting to. |
ConvertedType | The type that will be produced after applying this conversion. |
Construct the type we're converting to, which is a pointer to __autoreleasing pointee.
Definition at line 1318 of file SemaObjC.cpp.
References clang::Qualifiers::compatiblyIncludes(), clang::Qualifiers::empty(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::SemaBase::getLangOpts(), clang::Qualifiers::getObjCLifetime(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::Type::isObjCLifetimeType(), clang::Sema::isObjCPointerConversion(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::SemaBase::SemaRef, clang::Qualifiers::setObjCLifetime(), and clang::Qualifiers::withoutObjCLifetime().
Referenced by IsStandardConversion(), and tryObjCWritebackConversion().
Private Helper predicate to check for 'self'.
Definition at line 1935 of file SemaExprObjC.cpp.
References clang::Sema::CurContext, clang::DeclContext::getNonClosureAncestor(), isSelfExpr(), and clang::SemaBase::SemaRef.
Referenced by BuildInstanceMessage(), isSelfExpr(), and LookupMethodInReceiverType().
bool SemaObjC::isSelfExpr | ( | Expr * | RExpr, |
const ObjCMethodDecl * | Method | ||
) |
Definition at line 1942 of file SemaExprObjC.cpp.
References clang::ObjCMethodDecl::getSelfDecl(), and clang::Expr::IgnoreParenLValueCasts().
Definition at line 2308 of file SemaObjC.cpp.
References clang::SemaBase::getLangOpts(), clang::Type::isSpecificBuiltinType(), and NSAPIObj.
Referenced by DiagnoseFloatingImpCast().
Definition at line 1809 of file SemaObjC.cpp.
References D, clang::Type::getPointeeType(), clang::QualType::isNull(), and clang::isValidSubjectOfOSAttribute().
Referenced by ProcessDeclAttribute().
bool SemaObjC::IvarBacksCurrentMethodAccessor | ( | ObjCInterfaceDecl * | IFace, |
ObjCMethodDecl * | Method, | ||
ObjCIvarDecl * | IV | ||
) |
IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Method' and 'Method' is a property accessor declared in class 'IFace'.
Definition at line 1814 of file SemaObjCProperty.cpp.
References clang::ObjCMethodDecl::getSelector(), clang::ObjCIvarDecl::getSynthesize(), clang::ObjCContainerDecl::instance_properties(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ObjCMethodDecl::isPropertyAccessor(), clang::ObjCInterfaceDecl::known_extensions(), clang::ObjCInterfaceDecl::lookupMethod(), and clang::Property.
Referenced by BuildIvarRefExpr(), and LookupMemberExpr().
|
inline |
LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
Definition at line 873 of file SemaObjC.h.
Referenced by BuildClassMessage(), BuildInstanceMessage(), and ParseObjCSelectorExpression().
ObjCMethodDecl * SemaObjC::LookupImplementedMethodInGlobalPool | ( | Selector | Sel | ) |
LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.
Definition at line 3652 of file SemaDeclObjC.cpp.
References clang::SemaObjC::GlobalMethodPool::end(), clang::SemaObjC::GlobalMethodPool::find(), clang::ObjCMethodDecl::isDefined(), clang::ObjCMethodDecl::isPropertyAccessor(), and MethodPool.
Referenced by DiagnoseUseOfUnimplementedSelectors().
ExprResult SemaObjC::LookupInObjCMethod | ( | LookupResult & | LookUp, |
Scope * | S, | ||
IdentifierInfo * | II, | ||
bool | AllowBuiltinCreation = false |
||
) |
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
Perform some additional checks and determine if we should form a reference to an ivar. If so, build an expression referencing that ivar.
Definition at line 4855 of file SemaExprObjC.cpp.
References BuildIvarRefExpr(), clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::LookupResult::getNameLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Sema::LookupBuiltin(), LookupIvarInObjCMethod(), and clang::SemaBase::SemaRef.
Referenced by attemptRecovery().
|
inline |
LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
Definition at line 864 of file SemaObjC.h.
Referenced by BuildInstanceMessage(), hasIsEqualMethod(), and ParseObjCSelectorExpression().
DeclResult SemaObjC::LookupIvarInObjCMethod | ( | LookupResult & | Lookup, |
Scope * | S, | ||
IdentifierInfo * | II | ||
) |
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
Perform some additional checks and determine if we should form a reference to an ivar.
Ideally, most of this would be done by lookup, but there's actually quite a lot of extra work involved.
Definition at line 4782 of file SemaExprObjC.cpp.
References clang::declaresSameEntity(), clang::SemaBase::Diag(), clang::LookupResult::empty(), clang::ObjCIvarDecl::getAccessControl(), clang::ObjCMethodDecl::getClassInterface(), clang::Sema::getCurMethodDecl(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), clang::SemaBase::getLangOpts(), clang::LookupResult::getNameLoc(), clang::ObjCMethodDecl::isClassMethod(), clang::Decl::isDefinedOutsideFunctionOrMethod(), clang::ObjCMethodDecl::isInstanceMethod(), clang::LookupResult::isSingleResult(), Loc, clang::ObjCInterfaceDecl::lookupInstanceVariable(), clang::ObjCIvarDecl::Private, and clang::SemaBase::SemaRef.
Referenced by clang::Sema::ClassifyName(), and LookupInObjCMethod().
ObjCMethodDecl * SemaObjC::LookupMethodInObjectType | ( | Selector | Sel, |
QualType | Ty, | ||
bool | IsInstance | ||
) |
LookupMethodInType - Look up a method in an ObjCObjectType.
Definition at line 1953 of file SemaExprObjC.cpp.
References clang::ObjCObjectType::getInterface(), clang::ObjCProtocolQualifiers< T >::quals(), and clang::ast_matchers::type.
Referenced by CheckKeyForObjCARCConversion(), hasIsEqualMethod(), HelperIsMethodInObjCType(), and LookupMethodInReceiverType().
ObjCMethodDecl * SemaObjC::LookupMethodInQualifiedType | ( | Selector | Sel, |
const ObjCObjectPointerType * | OPT, | ||
bool | IsInstance | ||
) |
LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type.
Definition at line 1977 of file SemaExprObjC.cpp.
References clang::ObjCObjectPointerType::quals().
Referenced by BuildInstanceMessage(), CheckObjCForCollectionOperand(), HandleExprPropertyRefExpr(), and hasIsEqualMethod().
ObjCProtocolDecl * clang::SemaObjC::LookupProtocol | ( | IdentifierInfo * | II, |
SourceLocation | IdLoc, | ||
RedeclarationKind | Redecl = RedeclarationKind::NotForRedeclaration |
||
) |
Find the protocol with the given name, if any.
Definition at line 1301 of file SemaObjC.cpp.
References D, clang::Sema::LookupObjCProtocolName, clang::Sema::LookupSingleName(), clang::SemaBase::SemaRef, and clang::Sema::TUScope.
Referenced by ActOnForwardProtocolDeclaration(), actOnObjCTypeArgsOrProtocolQualifiers(), ActOnStartProtocolInterface(), BuildObjCDictionaryLiteral(), CheckForwardProtocolDeclarationForCircularDependency(), clang::SemaCodeCompletion::CodeCompleteObjCProtocolReferences(), CreatePropertyDecl(), FindProtocolDeclaration(), and ParseObjCProtocolExpression().
void SemaObjC::MatchAllMethodDeclarations | ( | const SelectorSet & | InsMap, |
const SelectorSet & | ClsMap, | ||
SelectorSet & | InsMapSeen, | ||
SelectorSet & | ClsMapSeen, | ||
ObjCImplDecl * | IMPDecl, | ||
ObjCContainerDecl * | IDecl, | ||
bool & | IncompleteImpl, | ||
bool | ImmediateClass, | ||
bool | WarnCategoryMethodImpl = false |
||
) |
MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declared in their implementations.
MatchAllMethodDeclarations - Check methods declared in interface or protocol against those declared in their implementations.
Definition at line 2834 of file SemaDeclObjC.cpp.
References clang::ObjCContainerDecl::class_methods(), clang::ObjCContainerDecl::getClassMethod(), clang::ObjCContainerDecl::getInstanceMethod(), clang::ObjCContainerDecl::instance_methods(), clang::ObjCMethodDecl::isSynthesizedAccessorStub(), MatchAllMethodDeclarations(), clang::SemaBase::SemaRef, WarnConflictingTypedMethods(), WarnExactTypedMethods(), and WarnUndefinedMethod().
Referenced by CheckCategoryVsClassMethodMatches(), ImplMethodsVsClassMethods(), and MatchAllMethodDeclarations().
bool SemaObjC::MatchTwoMethodDeclarations | ( | const ObjCMethodDecl * | left, |
const ObjCMethodDecl * | right, | ||
MethodMatchStrategy | strategy = MMS_strict |
||
) |
MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false, accordingly.
MatchTwoMethodDeclarations - Checks that two methods have matching type and returns true, or false, accordingly.
TODO: Handle protocol list; such as id<p1,p2> in type comparisons
Definition at line 3259 of file SemaDeclObjC.cpp.
References clang::SemaBase::getASTContext(), clang::SemaBase::getLangOpts(), clang::ObjCMethodDecl::getReturnType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isDirectMethod(), clang::Decl::isUnconditionallyVisible(), matchTypes(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().
Referenced by ActOnAtEnd(), addMethodToGlobalList(), DiagnoseClassExtensionDupMethods(), DiagnoseMultipleMethodInGlobalPool(), and HelperToDiagnoseMismatchedMethodsInGlobalPool().
Sema::RetainOwnershipKind clang::SemaObjC::parsedAttrToRetainOwnershipKind | ( | const ParsedAttr & | AL | ) |
Definition at line 1774 of file SemaObjC.cpp.
References clang::Sema::CF, clang::ParsedAttr::getKind(), clang::Sema::NS, and clang::Sema::OS.
Referenced by handleXReturnsXRetainedAttr(), and ProcessDeclAttribute().
ExprResult SemaObjC::ParseObjCEncodeExpression | ( | SourceLocation | AtLoc, |
SourceLocation | EncodeLoc, | ||
SourceLocation | LParenLoc, | ||
ParsedType | Ty, | ||
SourceLocation | RParenLoc | ||
) |
Definition at line 1167 of file SemaExprObjC.cpp.
References BuildObjCEncodeExpression(), clang::SemaBase::getASTContext(), clang::Sema::getLocForEndOfToken(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Sema::GetTypeFromParser(), and clang::SemaBase::SemaRef.
ExprResult SemaObjC::ParseObjCProtocolExpression | ( | IdentifierInfo * | ProtocolName, |
SourceLocation | AtLoc, | ||
SourceLocation | ProtoLoc, | ||
SourceLocation | LParenLoc, | ||
SourceLocation | ProtoIdLoc, | ||
SourceLocation | RParenLoc | ||
) |
ParseObjCProtocolExpression - Build protocol expression for @protocol.
Definition at line 1398 of file SemaExprObjC.cpp.
References clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getObjCProtoType(), clang::ObjCProtocolDecl::hasDefinition(), clang::ObjCProtocolDecl::isNonRuntimeProtocol(), clang::QualType::isNull(), and LookupProtocol().
ExprResult SemaObjC::ParseObjCSelectorExpression | ( | Selector | Sel, |
SourceLocation | AtLoc, | ||
SourceLocation | SelLoc, | ||
SourceLocation | LParenLoc, | ||
SourceLocation | RParenLoc, | ||
bool | WarnMultipleSelectors | ||
) |
ParseObjCSelectorExpression - Build selector expression for @selector.
Definition at line 1302 of file SemaExprObjC.cpp.
References clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), DiagnoseMismatchedSelectors(), findMethodInCurrentClass(), clang::Selector::getAsString(), clang::SemaBase::getASTContext(), clang::NamedDecl::getDeclName(), clang::ObjCMethodDecl::getImplementationControl(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::Selector::getMethodFamily(), clang::ASTContext::getObjCSelType(), clang::ObjCMethodDecl::getSelector(), clang::Sema::getSourceManager(), clang::ObjCMethodDecl::isDirectMethod(), clang::SourceManager::isInSystemHeader(), LookupDirectMethodInGlobalPool(), LookupFactoryMethodInGlobalPool(), LookupInstanceMethodInGlobalPool(), clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::Optional, ReferencedSelectors, SelectorsForTypoCorrection(), and clang::SemaBase::SemaRef.
ExprResult SemaObjC::ParseObjCStringLiteral | ( | SourceLocation * | AtLocs, |
ArrayRef< Expr * > | Strings | ||
) |
Definition at line 39 of file SemaExprObjC.cpp.
References BuildObjCStringLiteral(), clang::StringLiteral::Create(), clang::SemaBase::Diag(), E, clang::ASTContext::getAsConstantArrayType(), clang::SemaBase::getASTContext(), clang::ASTContext::getConstantArrayType(), clang::ArrayType::getElementType(), clang::ArrayType::getIndexTypeCVRQualifiers(), clang::ArrayType::getSizeModifier(), and clang::Ordinary.
void SemaObjC::popObjCTypeParamList | ( | Scope * | S, |
ObjCTypeParamList * | typeParamList | ||
) |
Definition at line 804 of file SemaDeclObjC.cpp.
References clang::Sema::IdResolver, clang::IdentifierResolver::RemoveDecl(), and clang::SemaBase::SemaRef.
Referenced by clang::Parser::ObjCTypeParamListScope::leave().
CastKind SemaObjC::PrepareCastToObjCObjectPointer | ( | ExprResult & | E | ) |
Prepare a conversion of the given expression to an ObjC object pointer type.
Definition at line 5197 of file SemaExprObjC.cpp.
References E, clang::Expr::getType(), clang::Sema::maybeExtendBlockObject(), clang::SemaBase::SemaRef, and clang::ast_matchers::type.
Referenced by clang::Sema::PerformImplicitConversion().
void SemaObjC::ProcessPropertyDecl | ( | ObjCPropertyDecl * | property | ) |
Process the specified property declaration and create decls for the setters and getters as needed.
ProcessPropertyDecl - Make sure that any user-defined setter/getter methods have the property type and issue diagnostics if they don't.
property | The property declaration being processed |
Also synthesize a getter/setter method if none exist (and update the appropriate lookup tables.
Definition at line 2356 of file SemaObjCProperty.cpp.
References clang::Decl::addAttr(), clang::DeclContext::addDecl(), AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), AddPropertyAttrs(), CheckARCMethodDecl(), CheckObjCMethodOverrides(), clang::ParmVarDecl::Create(), clang::ObjCMethodDecl::Create(), clang::ObjCMethodDecl::createImplicitParams(), clang::SemaBase::Diag(), DiagnosePropertyAccessorMismatch(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::ASTContext::getAttributedType(), clang::ASTContext::getCanonicalType(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCContainerDecl::getClassMethod(), clang::Decl::getDeclContext(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyImplementation(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), clang::Decl::hasAttr(), clang::ASTContext::hasSameUnqualifiedType(), clang::ObjCPropertyDecl::isDirectProperty(), clang::Decl::isInvalidDecl(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyAttribute::kind_null_resettable, Loc, clang::Optional, clang::ObjCPropertyDecl::Optional, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_size(), clang::Sema::ProcessAPINotes(), clang::Required, RTC_Unknown, clang::SC_None, clang::SemaBase::SemaRef, clang::ObjCMethodDecl::setMethodParams(), clang::ObjCMethodDecl::setPropertyAccessor(), clang::AttributedType::stripOuterNullability(), clang::Unspecified, and clang::ASTContext::VoidTy.
Referenced by ActOnAtEnd(), and HandlePropertyInClassExtension().
void SemaObjC::ReadMethodPool | ( | Selector | Sel | ) |
Read the contents of the method pool for a given selector from external storage.
Definition at line 3424 of file SemaDeclObjC.cpp.
References clang::Sema::ExternalSource, and clang::SemaBase::SemaRef.
Referenced by AddClassMessageCompletions(), clang::SemaCodeCompletion::CodeCompleteObjCInstanceMessage(), clang::SemaCodeCompletion::CodeCompleteObjCMethodDeclSelector(), clang::SemaCodeCompletion::CodeCompleteObjCSelector(), and CollectMultipleMethodsInGlobalPool().
const ObjCMethodDecl * SemaObjC::SelectorsForTypoCorrection | ( | Selector | Sel, |
QualType | ObjectType = QualType() |
||
) |
Definition at line 3709 of file SemaDeclObjC.cpp.
References b, clang::SemaObjC::GlobalMethodPool::begin(), clang::SemaObjC::GlobalMethodPool::end(), clang::Type::getAsObjCInterfacePointerType(), clang::Selector::getAsString(), clang::Selector::getNumArgs(), HelperIsMethodInObjCType(), HelperSelectorsForTypoCorrection(), clang::QualType::isNull(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedClassType(), clang::Type::isObjCQualifiedIdType(), MethodPool, and clang::SemaBase::SemaRef.
Referenced by CheckMessageArgumentTypes(), and ParseObjCSelectorExpression().
void SemaObjC::SetIvarInitializers | ( | ObjCImplementationDecl * | ObjCImplementation | ) |
SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whose ivars need be initialized.
Definition at line 5499 of file SemaDeclObjC.cpp.
References clang::Sema::CheckDestructorAccess(), CollectIvarsToConstructOrDestruct(), clang::CPlusPlus, clang::InitializationKind::CreateDefault(), clang::Destructor, clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::SemaBase::getASTContext(), clang::ASTContext::getBaseElementType(), clang::ObjCImplDecl::getClassInterface(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::InitializedEntity::InitializeMember(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Sema::LookupDestructor(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MaybeCreateExprWithCleanups(), clang::Member, clang::SemaBase::PDiag(), clang::InitializationSequence::Perform(), clang::SemaBase::SemaRef, and clang::ObjCImplementationDecl::setIvarInitializers().
Referenced by ActOnAtEnd().
stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.
Definition at line 4557 of file SemaExprObjC.cpp.
References clang::UnaryOperator::Create(), clang::GenericSelectionExpr::Create(), clang::Sema::CurFPFeatureOverrides(), clang::SemaBase::getASTContext(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Expr::hasPlaceholderType(), clang::SemaBase::SemaRef, and stripARCUnbridgedCast().
Referenced by CheckMessageArgumentTypes(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::Sema::GatherArgumentsForCall(), and stripARCUnbridgedCast().
ObjCMethodDecl * SemaObjC::tryCaptureObjCSelf | ( | SourceLocation | Loc | ) |
Try to capture an implicit reference to 'self'.
Definition at line 1428 of file SemaExprObjC.cpp.
References clang::Sema::getFunctionLevelDeclContext(), clang::ObjCMethodDecl::getSelfDecl(), Loc, clang::SemaBase::SemaRef, and clang::Sema::tryCaptureVariable().
Referenced by ActOnClassPropertyRefExpr(), and ActOnSuperMessage().
void SemaObjC::updateOutOfDateSelector | ( | Selector | Sel | ) |
Definition at line 3429 of file SemaDeclObjC.cpp.
References clang::Sema::ExternalSource, and clang::SemaBase::SemaRef.
void SemaObjC::WarnConflictingTypedMethods | ( | ObjCMethodDecl * | Method, |
ObjCMethodDecl * | MethodDecl, | ||
bool | IsProtocolMethodDecl | ||
) |
Definition at line 2586 of file SemaDeclObjC.cpp.
References checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), clang::SemaBase::Diag(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), and clang::SemaBase::SemaRef.
Referenced by MatchAllMethodDeclarations().
void SemaObjC::WarnExactTypedMethods | ( | ObjCMethodDecl * | Method, |
ObjCMethodDecl * | MethodDecl, | ||
bool | IsProtocolMethodDecl | ||
) |
WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches exactly that of its declaration.
Definition at line 2635 of file SemaDeclObjC.cpp.
References CheckMethodOverrideParam(), CheckMethodOverrideReturn(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::NamedDecl::getDeclName(), clang::ObjCMethodDecl::getImplementationControl(), clang::Decl::getLocation(), clang::GetNullarySelector(), clang::ObjCMethodDecl::getSelector(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isVariadic(), clang::ast_matchers::match(), clang::Optional, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), and clang::SemaBase::SemaRef.
Referenced by MatchAllMethodDeclarations().
ObjCMethodDecl* clang::SemaObjC::ArrayWithObjectsMethod |
The declaration of the arrayWithObjects:count: method.
Definition at line 634 of file SemaObjC.h.
Referenced by BuildObjCArrayLiteral().
RecordDecl* clang::SemaObjC::CFError = nullptr |
The struct behind the CFErrorRef pointer.
Definition at line 158 of file SemaObjC.h.
Referenced by isCFError().
ObjCMethodDecl* clang::SemaObjC::DictionaryWithObjectsMethod |
The declaration of the dictionaryWithObjects:forKeys:count: method.
Definition at line 640 of file SemaObjC.h.
Referenced by BuildObjCDictionaryLiteral().
GlobalMethodPool clang::SemaObjC::MethodPool |
Method Pool - allows efficient lookup when typechecking messages to "id".
We need to maintain a list, since selectors can have differing signatures across classes. In Cocoa, this happens to be extremely uncommon (only 1% of selectors are "overloaded"). At the head of the list it is recorded whether there were 0, 1, or >= 2 methods inside categories with a particular selector.
Definition at line 234 of file SemaObjC.h.
Referenced by AddClassMessageCompletions(), AreMultipleMethodsInGlobalPool(), CheckObjCMethodOverrides(), clang::SemaCodeCompletion::CodeCompleteObjCInstanceMessage(), clang::SemaCodeCompletion::CodeCompleteObjCMethodDeclSelector(), clang::SemaCodeCompletion::CodeCompleteObjCSelector(), CollectMultipleMethodsInGlobalPool(), DiagnoseMismatchedSelectors(), LookupDirectMethodInGlobalPool(), LookupImplementedMethodInGlobalPool(), moveMethodToBackOfGlobalList(), clang::ASTReader::ReadMethodPool(), and SelectorsForTypoCorrection().
std::unique_ptr<NSAPI> clang::SemaObjC::NSAPIObj |
Caches identifiers/selectors for NSFoundation APIs.
Definition at line 601 of file SemaObjC.h.
Referenced by ActOnAtEnd(), clang::Sema::ActOnFinishFunctionBody(), applyCocoaAPICheck(), BuildObjCArrayLiteral(), BuildObjCDictionaryLiteral(), BuildObjCStringLiteral(), CheckObjCCollectionLiteralElement(), CheckTautologicalComparison(), hasIsEqualMethod(), isMethodDeclaredInRootProtocol(), isSignedCharBool(), LookupObjCInterfaceDeclForLiteral(), clang::Sema::Sema(), ShouldDiagnoseAvailabilityOfDecl(), and ValidateObjCLiteralInterfaceDecl().
ObjCInterfaceDecl* clang::SemaObjC::NSArrayDecl |
The declaration of the Objective-C NSArray class.
Definition at line 631 of file SemaObjC.h.
Referenced by BuildObjCArrayLiteral(), and checkArrayLiteral().
ObjCInterfaceDecl* clang::SemaObjC::NSDictionaryDecl |
The declaration of the Objective-C NSDictionary class.
Definition at line 637 of file SemaObjC.h.
Referenced by BuildObjCDictionaryLiteral(), and checkDictionaryLiteral().
ObjCInterfaceDecl* clang::SemaObjC::NSNumberDecl |
The declaration of the Objective-C NSNumber class.
Definition at line 604 of file SemaObjC.h.
ObjCMethodDecl* clang::SemaObjC::NSNumberLiteralMethods[NSAPI::NumNSNumberLiteralMethods] |
The Objective-C NSNumber methods used to create NSNumber literals.
Definition at line 616 of file SemaObjC.h.
Referenced by clang::Sema::Sema().
QualType clang::SemaObjC::NSNumberPointer |
Pointer to NSNumber type (NSNumber *).
Definition at line 610 of file SemaObjC.h.
Referenced by BuildObjCBoxedExpr(), and BuildObjCNumericLiteral().
ObjCInterfaceDecl* clang::SemaObjC::NSStringDecl |
The declaration of the Objective-C NSString class.
Definition at line 619 of file SemaObjC.h.
Referenced by BuildObjCBoxedExpr().
QualType clang::SemaObjC::NSStringPointer |
Pointer to NSString type (NSString *).
Definition at line 622 of file SemaObjC.h.
Referenced by BuildObjCBoxedExpr().
ObjCInterfaceDecl* clang::SemaObjC::NSValueDecl |
The declaration of the Objective-C NSValue class.
Definition at line 607 of file SemaObjC.h.
Referenced by BuildObjCBoxedExpr().
QualType clang::SemaObjC::NSValuePointer |
Pointer to NSValue type (NSValue *).
Definition at line 613 of file SemaObjC.h.
Referenced by BuildObjCBoxedExpr().
QualType clang::SemaObjC::QIDNSCopying |
id<NSCopying> type.
Definition at line 643 of file SemaObjC.h.
Referenced by BuildObjCDictionaryLiteral().
llvm::MapVector<Selector, SourceLocation> clang::SemaObjC::ReferencedSelectors |
Method selectors used in a @selector expression.
Used for implementation of -Wselector.
Definition at line 209 of file SemaObjC.h.
Referenced by DiagnoseUseOfUnimplementedSelectors(), and ParseObjCSelectorExpression().
Selector clang::SemaObjC::RespondsToSelectorSel |
will hold 'respondsToSelector:'
Definition at line 646 of file SemaObjC.h.
Referenced by ActOnInstanceMessage().
ObjCMethodDecl* clang::SemaObjC::StringWithUTF8StringMethod |
The declaration of the stringWithUTF8String: method.
Definition at line 625 of file SemaObjC.h.
Referenced by BuildObjCBoxedExpr().
ObjCMethodDecl* clang::SemaObjC::ValueWithBytesObjCTypeMethod |
The declaration of the valueWithBytes:objCType: method.
Definition at line 628 of file SemaObjC.h.
Referenced by BuildObjCBoxedExpr().