Lines Matching refs:AL

1524 static bool checkIBOutletCommon(Sema &S, Decl *D, const ParsedAttr &AL) {  in checkIBOutletCommon()  argument
1530 S.Diag(AL.getLoc(), diag::warn_iboutlet_object_type) in checkIBOutletCommon()
1531 << AL << VD->getType() << 0; in checkIBOutletCommon()
1536 S.Diag(AL.getLoc(), diag::warn_iboutlet_object_type) in checkIBOutletCommon()
1537 << AL << PD->getType() << 1; in checkIBOutletCommon()
1541 S.Diag(AL.getLoc(), diag::warn_attribute_iboutlet) << AL; in checkIBOutletCommon()
1548 void SemaObjC::handleIBOutlet(Decl *D, const ParsedAttr &AL) { in handleIBOutlet() argument
1549 if (!checkIBOutletCommon(SemaRef, D, AL)) in handleIBOutlet()
1552 D->addAttr(::new (getASTContext()) IBOutletAttr(getASTContext(), AL)); in handleIBOutlet()
1555 void SemaObjC::handleIBOutletCollection(Decl *D, const ParsedAttr &AL) { in handleIBOutletCollection() argument
1559 if (AL.getNumArgs() > 1) { in handleIBOutletCollection()
1560 Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << 1; in handleIBOutletCollection()
1564 if (!checkIBOutletCommon(SemaRef, D, AL)) in handleIBOutletCollection()
1569 if (AL.hasParsedType()) in handleIBOutletCollection()
1570 PT = AL.getTypeArg(); in handleIBOutletCollection()
1573 Context.Idents.get("NSObject"), AL.getLoc(), in handleIBOutletCollection()
1576 Diag(AL.getLoc(), diag::err_iboutletcollection_type) << "NSObject"; in handleIBOutletCollection()
1584 QTLoc = Context.getTrivialTypeSourceInfo(QT, AL.getLoc()); in handleIBOutletCollection()
1591 Diag(AL.getLoc(), QT->isBuiltinType() in handleIBOutletCollection()
1598 D->addAttr(::new (Context) IBOutletCollectionAttr(Context, AL, QTLoc)); in handleIBOutletCollection()
1601 void SemaObjC::handleSuppresProtocolAttr(Decl *D, const ParsedAttr &AL) { in handleSuppresProtocolAttr() argument
1603 Diag(AL.getLoc(), diag::err_objc_attr_protocol_requires_definition) in handleSuppresProtocolAttr()
1604 << AL << AL.getRange(); in handleSuppresProtocolAttr()
1609 ObjCExplicitProtocolImplAttr(getASTContext(), AL)); in handleSuppresProtocolAttr()
1612 void SemaObjC::handleDirectAttr(Decl *D, const ParsedAttr &AL) { in handleDirectAttr() argument
1615 Diag(AL.getLoc(), diag::err_objc_direct_on_protocol) << false; in handleDirectAttr()
1620 handleSimpleAttribute<ObjCDirectAttr>(*this, D, AL); in handleDirectAttr()
1622 Diag(AL.getLoc(), diag::warn_objc_direct_ignored) << AL; in handleDirectAttr()
1626 void SemaObjC::handleDirectMembersAttr(Decl *D, const ParsedAttr &AL) { in handleDirectMembersAttr() argument
1628 handleSimpleAttribute<ObjCDirectMembersAttr>(*this, D, AL); in handleDirectMembersAttr()
1630 Diag(AL.getLoc(), diag::warn_objc_direct_ignored) << AL; in handleDirectMembersAttr()
1634 void SemaObjC::handleMethodFamilyAttr(Decl *D, const ParsedAttr &AL) { in handleMethodFamilyAttr() argument
1636 if (!AL.isArgIdent(0)) { in handleMethodFamilyAttr()
1637 Diag(AL.getLoc(), diag::err_attribute_argument_n_type) in handleMethodFamilyAttr()
1638 << AL << 1 << AANT_ArgumentIdentifier; in handleMethodFamilyAttr()
1642 IdentifierLoc *IL = AL.getArgAsIdent(0); in handleMethodFamilyAttr()
1645 Diag(IL->Loc, diag::warn_attribute_type_not_supported) << AL << IL->Ident; in handleMethodFamilyAttr()
1658 ObjCMethodFamilyAttr(getASTContext(), AL, F)); in handleMethodFamilyAttr()
1661 void SemaObjC::handleNSObject(Decl *D, const ParsedAttr &AL) { in handleNSObject() argument
1683 D->addAttr(::new (getASTContext()) ObjCNSObjectAttr(getASTContext(), AL)); in handleNSObject()
1686 void SemaObjC::handleIndependentClass(Decl *D, const ParsedAttr &AL) { in handleIndependentClass() argument
1698 ObjCIndependentClassAttr(getASTContext(), AL)); in handleIndependentClass()
1701 void SemaObjC::handleBlocksAttr(Decl *D, const ParsedAttr &AL) { in handleBlocksAttr() argument
1702 if (!AL.isArgIdent(0)) { in handleBlocksAttr()
1703 Diag(AL.getLoc(), diag::err_attribute_argument_n_type) in handleBlocksAttr()
1704 << AL << 1 << AANT_ArgumentIdentifier; in handleBlocksAttr()
1708 IdentifierInfo *II = AL.getArgAsIdent(0)->Ident; in handleBlocksAttr()
1711 Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << II; in handleBlocksAttr()
1715 D->addAttr(::new (getASTContext()) BlocksAttr(getASTContext(), AL, type)); in handleBlocksAttr()
1773 SemaObjC::parsedAttrToRetainOwnershipKind(const ParsedAttr &AL) { in parsedAttrToRetainOwnershipKind() argument
1774 switch (AL.getKind()) { in parsedAttrToRetainOwnershipKind()
1817 void SemaObjC::handleXReturnsXRetainedAttr(Decl *D, const ParsedAttr &AL) { in handleXReturnsXRetainedAttr() argument
1819 Sema::RetainOwnershipKind K = parsedAttrToRetainOwnershipKind(AL); in handleXReturnsXRetainedAttr()
1824 (AL.getKind() == ParsedAttr::AT_NSReturnsRetained)) { in handleXReturnsXRetainedAttr()
1839 << AL << DiagID << AL.getRange(); in handleXReturnsXRetainedAttr()
1842 } else if (AL.isUsedAsTypeAttr()) { in handleXReturnsXRetainedAttr()
1846 switch (AL.getKind()) { in handleXReturnsXRetainedAttr()
1863 << AL.getRange() << AL << AL.isRegularKeywordAttribute() in handleXReturnsXRetainedAttr()
1871 switch (AL.getKind()) { in handleXReturnsXRetainedAttr()
1900 if (AL.isUsedAsTypeAttr()) in handleXReturnsXRetainedAttr()
1905 << AL << ParmDiagID << AL.getRange(); in handleXReturnsXRetainedAttr()
1914 << AL << SubjectKind << Cf << AL.getRange(); in handleXReturnsXRetainedAttr()
1919 switch (AL.getKind()) { in handleXReturnsXRetainedAttr()
1923 handleSimpleAttribute<NSReturnsAutoreleasedAttr>(*this, D, AL); in handleXReturnsXRetainedAttr()
1926 handleSimpleAttribute<CFReturnsNotRetainedAttr>(*this, D, AL); in handleXReturnsXRetainedAttr()
1929 handleSimpleAttribute<NSReturnsNotRetainedAttr>(*this, D, AL); in handleXReturnsXRetainedAttr()
1932 handleSimpleAttribute<CFReturnsRetainedAttr>(*this, D, AL); in handleXReturnsXRetainedAttr()
1935 handleSimpleAttribute<NSReturnsRetainedAttr>(*this, D, AL); in handleXReturnsXRetainedAttr()
1938 handleSimpleAttribute<OSReturnsRetainedAttr>(*this, D, AL); in handleXReturnsXRetainedAttr()
1941 handleSimpleAttribute<OSReturnsNotRetainedAttr>(*this, D, AL); in handleXReturnsXRetainedAttr()
2025 void SemaObjC::handleBridgeAttr(Decl *D, const ParsedAttr &AL) { in handleBridgeAttr() argument
2026 IdentifierLoc *Parm = AL.isArgIdent(0) ? AL.getArgAsIdent(0) : nullptr; in handleBridgeAttr()
2029 Diag(D->getBeginLoc(), diag::err_objc_attr_not_id) << AL << 0; in handleBridgeAttr()
2036 Diag(AL.getLoc(), diag::err_objc_attr_typedef_not_id) << AL; in handleBridgeAttr()
2043 Diag(AL.getLoc(), diag::err_objc_attr_typedef_not_void_pointer); in handleBridgeAttr()
2049 ObjCBridgeAttr(getASTContext(), AL, Parm->Ident)); in handleBridgeAttr()
2052 void SemaObjC::handleBridgeMutableAttr(Decl *D, const ParsedAttr &AL) { in handleBridgeMutableAttr() argument
2053 IdentifierLoc *Parm = AL.isArgIdent(0) ? AL.getArgAsIdent(0) : nullptr; in handleBridgeMutableAttr()
2056 Diag(D->getBeginLoc(), diag::err_objc_attr_not_id) << AL << 0; in handleBridgeMutableAttr()
2061 ObjCBridgeMutableAttr(getASTContext(), AL, Parm->Ident)); in handleBridgeMutableAttr()
2064 void SemaObjC::handleBridgeRelatedAttr(Decl *D, const ParsedAttr &AL) { in handleBridgeRelatedAttr() argument
2066 AL.isArgIdent(0) ? AL.getArgAsIdent(0)->Ident : nullptr; in handleBridgeRelatedAttr()
2068 Diag(D->getBeginLoc(), diag::err_objc_attr_not_id) << AL << 0; in handleBridgeRelatedAttr()
2072 AL.getArgAsIdent(1) ? AL.getArgAsIdent(1)->Ident : nullptr; in handleBridgeRelatedAttr()
2074 AL.getArgAsIdent(2) ? AL.getArgAsIdent(2)->Ident : nullptr; in handleBridgeRelatedAttr()
2076 getASTContext(), AL, RelatedClass, ClassMethod, InstanceMethod)); in handleBridgeRelatedAttr()
2079 void SemaObjC::handleDesignatedInitializer(Decl *D, const ParsedAttr &AL) { in handleDesignatedInitializer() argument
2102 ObjCDesignatedInitializerAttr(getASTContext(), AL)); in handleDesignatedInitializer()
2105 void SemaObjC::handleRuntimeName(Decl *D, const ParsedAttr &AL) { in handleRuntimeName() argument
2107 if (!SemaRef.checkStringLiteralArgumentAttr(AL, 0, MetaDataName)) in handleRuntimeName()
2110 ObjCRuntimeNameAttr(getASTContext(), AL, MetaDataName)); in handleRuntimeName()
2117 void SemaObjC::handleBoxable(Decl *D, const ParsedAttr &AL) { in handleBoxable() argument
2128 ::new (getASTContext()) ObjCBoxableAttr(getASTContext(), AL); in handleBoxable()
2139 void SemaObjC::handleOwnershipAttr(Decl *D, const ParsedAttr &AL) { in handleOwnershipAttr() argument
2144 << AL.getRange() << AL << AL.isRegularKeywordAttribute() in handleOwnershipAttr()
2148 void SemaObjC::handlePreciseLifetimeAttr(Decl *D, const ParsedAttr &AL) { in handlePreciseLifetimeAttr() argument
2153 Diag(AL.getLoc(), diag::err_objc_precise_lifetime_bad_type) << QT; in handlePreciseLifetimeAttr()
2176 Diag(AL.getLoc(), diag::warn_objc_precise_lifetime_meaningless) in handlePreciseLifetimeAttr()
2182 ObjCPreciseLifetimeAttr(getASTContext(), AL)); in handlePreciseLifetimeAttr()
2222 void SemaObjC::handleExternallyRetainedAttr(Decl *D, const ParsedAttr &AL) { in handleExternallyRetainedAttr() argument
2233 handleSimpleAttribute<ObjCExternallyRetainedAttr>(*this, D, AL); in handleExternallyRetainedAttr()
2255 handleSimpleAttribute<ObjCExternallyRetainedAttr>(*this, D, AL); in handleExternallyRetainedAttr()