Lines Matching refs:Context

69     const ConstantArrayType *CAT = Context.getAsConstantArrayType(S->getType());  in ParseObjCStringLiteral()
71 QualType StrTy = Context.getConstantArrayType( in ParseObjCStringLiteral()
74 S = StringLiteral::Create(Context, StrBuf, StringLiteralKind::Ordinary, in ParseObjCStringLiteral()
91 QualType Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
93 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
99 NSIdent = &Context.Idents.get("NSConstantString"); in BuildObjCStringLiteral()
101 NSIdent = &Context.Idents.get(StringClass); in BuildObjCStringLiteral()
106 Context.setObjCConstantStringInterface(StrIF); in BuildObjCStringLiteral()
107 Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
108 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
114 Ty = Context.getObjCIdType(); in BuildObjCStringLiteral()
121 Context.setObjCConstantStringInterface(StrIF); in BuildObjCStringLiteral()
122 Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
123 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
129 Ty = Context.getObjCNSStringType(); in BuildObjCStringLiteral()
132 ObjCInterfaceDecl::Create (Context, in BuildObjCStringLiteral()
133 Context.getTranslationUnitDecl(), in BuildObjCStringLiteral()
136 Ty = Context.getObjCInterfaceType(NSStringIDecl); in BuildObjCStringLiteral()
137 Context.setObjCNSStringType(Ty); in BuildObjCStringLiteral()
139 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
143 return new (Context) ObjCStringLiteral(S, Ty, AtLoc); in BuildObjCStringLiteral()
228 ASTContext &Context = S.Context; in LookupObjCInterfaceDeclForLiteral() local
229 TranslationUnitDecl *TU = Context.getTranslationUnitDecl(); in LookupObjCInterfaceDeclForLiteral()
230 ID = ObjCInterfaceDecl::Create (Context, TU, SourceLocation(), II, in LookupObjCInterfaceDeclForLiteral()
265 ASTContext &CX = S.Context; in getNSNumberFactoryMethod()
297 ParmVarDecl *value = ParmVarDecl::Create(S.Context, Method, in getNSNumberFactoryMethod()
302 Method->setMethodParams(S.Context, value, std::nullopt); in getNSNumberFactoryMethod()
326 NumberType = Context.CharTy; in BuildObjCNumericLiteral()
330 NumberType = Context.getWideCharType(); in BuildObjCNumericLiteral()
334 NumberType = Context.Char16Ty; in BuildObjCNumericLiteral()
338 NumberType = Context.Char32Ty; in BuildObjCNumericLiteral()
353 InitializedEntity Entity = InitializedEntity::InitializeParameter(Context, in BuildObjCNumericLiteral()
364 new (Context) ObjCBoxedExpr(Number, NSNumberPointer, Method, in BuildObjCNumericLiteral()
378 Inner = ImpCastExprToType(Inner.get(), Context.BoolTy, in ActOnObjCBoolLiteral()
403 = InitializedEntity::InitializeParameter(S.Context, T, in CheckObjCCollectionLiteralElement()
496 InitializedEntity::InitializeParameter(S.Context, T, in CheckObjCCollectionLiteralElement()
504 new (Context) ObjCBoxedExpr(ValueExpr, Context.DependentTy, nullptr, SR); in BuildObjCBoxedExpr()
519 if (Context.hasSameUnqualifiedType(PointeeType, Context.CharTy)) { in BuildObjCBoxedExpr()
527 QualType NSStringObject = Context.getObjCInterfaceType(NSStringDecl); in BuildObjCBoxedExpr()
528 NSStringPointer = Context.getObjCObjectPointerType(NSStringObject); in BuildObjCBoxedExpr()
544 BoxedType = Context.getAttributedType( in BuildObjCBoxedExpr()
548 return new (Context) ObjCBoxedExpr(CE, BoxedType, nullptr, SR); in BuildObjCBoxedExpr()
556 IdentifierInfo *II = &Context.Idents.get("stringWithUTF8String"); in BuildObjCBoxedExpr()
557 Selector stringWithUTF8String = Context.Selectors.getUnarySelector(II); in BuildObjCBoxedExpr()
565 Context, SourceLocation(), SourceLocation(), stringWithUTF8String, in BuildObjCBoxedExpr()
573 QualType ConstCharType = Context.CharTy.withConst(); in BuildObjCBoxedExpr()
575 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
577 &Context.Idents.get("value"), in BuildObjCBoxedExpr()
578 Context.getPointerType(ConstCharType), in BuildObjCBoxedExpr()
581 M->setMethodParams(Context, value, std::nullopt); in BuildObjCBoxedExpr()
598 BoxedType = Context.getAttributedType( in BuildObjCBoxedExpr()
616 ValueType = Context.CharTy; in BuildObjCBoxedExpr()
620 ValueType = Context.getWideCharType(); in BuildObjCBoxedExpr()
624 ValueType = Context.Char16Ty; in BuildObjCBoxedExpr()
628 ValueType = Context.Char32Ty; in BuildObjCBoxedExpr()
661 QualType NSValueObject = Context.getObjCInterfaceType(NSValueDecl); in BuildObjCBoxedExpr()
662 NSValuePointer = Context.getObjCObjectPointerType(NSValueObject); in BuildObjCBoxedExpr()
667 &Context.Idents.get("valueWithBytes"), in BuildObjCBoxedExpr()
668 &Context.Idents.get("objCType") in BuildObjCBoxedExpr()
670 Selector ValueWithBytesObjCType = Context.Selectors.getSelector(2, II); in BuildObjCBoxedExpr()
678 Context, SourceLocation(), SourceLocation(), ValueWithBytesObjCType, in BuildObjCBoxedExpr()
691 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
693 &Context.Idents.get("bytes"), in BuildObjCBoxedExpr()
694 Context.VoidPtrTy.withConst(), in BuildObjCBoxedExpr()
699 QualType ConstCharType = Context.CharTy.withConst(); in BuildObjCBoxedExpr()
701 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
703 &Context.Idents.get("type"), in BuildObjCBoxedExpr()
704 Context.getPointerType(ConstCharType), in BuildObjCBoxedExpr()
709 M->setMethodParams(Context, Params, std::nullopt); in BuildObjCBoxedExpr()
720 if (!ValueType.isTriviallyCopyableType(Context)) { in BuildObjCBoxedExpr()
746 InitializedEntity IE = InitializedEntity::InitializeParameter(Context, in BuildObjCBoxedExpr()
757 new (Context) ObjCBoxedExpr(ValueExpr, BoxedType, in BuildObjCBoxedExpr()
789 return new (Context) ObjCSubscriptRefExpr( in BuildObjCSubscriptExpression()
790 BaseExpr, IndexExpr, Context.PseudoObjectTy, VK_LValue, OK_ObjCSubscript, in BuildObjCSubscriptExpression()
806 QualType IdT = Context.getObjCIdType(); in BuildObjCArrayLiteral()
814 Context, SourceLocation(), SourceLocation(), Sel, IdT, ReturnTInfo, in BuildObjCArrayLiteral()
815 Context.getTranslationUnitDecl(), false /*Instance*/, in BuildObjCArrayLiteral()
821 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
824 &Context.Idents.get("objects"), in BuildObjCArrayLiteral()
825 Context.getPointerType(IdT), in BuildObjCArrayLiteral()
829 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
832 &Context.Idents.get("cnt"), in BuildObjCArrayLiteral()
833 Context.UnsignedLongTy, in BuildObjCArrayLiteral()
837 Method->setMethodParams(Context, Params, std::nullopt); in BuildObjCArrayLiteral()
847 !Context.hasSameUnqualifiedType(PtrT->getPointeeType(), IdT)) { in BuildObjCArrayLiteral()
853 << Context.getPointerType(IdT.withConst()); in BuildObjCArrayLiteral()
890 = Context.getObjCObjectPointerType( in BuildObjCArrayLiteral()
891 Context.getObjCInterfaceType(NSArrayDecl)); in BuildObjCArrayLiteral()
894 ObjCArrayLiteral::Create(Context, Elements, Ty, in BuildObjCArrayLiteral()
968 QualType IdT = Context.getObjCIdType(); in BuildObjCDictionaryLiteral()
975 Context, SourceLocation(), SourceLocation(), Sel, IdT, in BuildObjCDictionaryLiteral()
976 nullptr /*TypeSourceInfo */, Context.getTranslationUnitDecl(), in BuildObjCDictionaryLiteral()
983 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
986 &Context.Idents.get("objects"), in BuildObjCDictionaryLiteral()
987 Context.getPointerType(IdT), in BuildObjCDictionaryLiteral()
991 ParmVarDecl *keys = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
994 &Context.Idents.get("keys"), in BuildObjCDictionaryLiteral()
995 Context.getPointerType(IdT), in BuildObjCDictionaryLiteral()
999 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
1002 &Context.Idents.get("cnt"), in BuildObjCDictionaryLiteral()
1003 Context.UnsignedLongTy, in BuildObjCDictionaryLiteral()
1007 Method->setMethodParams(Context, Params, std::nullopt); in BuildObjCDictionaryLiteral()
1018 !Context.hasSameUnqualifiedType(PtrValue->getPointeeType(), IdT)) { in BuildObjCDictionaryLiteral()
1024 << Context.getPointerType(IdT.withConst()); in BuildObjCDictionaryLiteral()
1032 !Context.hasSameUnqualifiedType(PtrKey->getPointeeType(), in BuildObjCDictionaryLiteral()
1039 LookupProtocol(&Context.Idents.get("NSCopying"), SR.getBegin())) { in BuildObjCDictionaryLiteral()
1041 QIDNSCopying = Context.getObjCObjectType( in BuildObjCDictionaryLiteral()
1042 Context.ObjCBuiltinIdTy, {}, in BuildObjCDictionaryLiteral()
1044 QIDNSCopying = Context.getObjCObjectPointerType(QIDNSCopying); in BuildObjCDictionaryLiteral()
1048 err = !Context.hasSameUnqualifiedType(PtrKey->getPointeeType(), in BuildObjCDictionaryLiteral()
1058 << Context.getPointerType(IdT.withConst()); in BuildObjCDictionaryLiteral()
1118 QualType Ty = Context.getObjCObjectPointerType( in BuildObjCDictionaryLiteral()
1119 Context.getObjCInterfaceType(NSDictionaryDecl)); in BuildObjCDictionaryLiteral()
1122 ObjCDictionaryLiteral::Create(Context, Elements, HasPackExpansions, Ty, in BuildObjCDictionaryLiteral()
1134 StrTy = Context.DependentTy; in BuildObjCEncodeExpression()
1145 Context.getObjCEncodingForType(EncodedType, Str, nullptr, &NotEncodedT); in BuildObjCEncodeExpression()
1152 StrTy = Context.getStringLiteralArrayType(Context.CharTy, Str.size()); in BuildObjCEncodeExpression()
1155 return new (Context) ObjCEncodeExpr(StrTy, EncodedTypeInfo, AtLoc, RParenLoc); in BuildObjCEncodeExpression()
1167 TInfo = Context.getTrivialTypeSourceInfo(EncodedType, in ParseObjCEncodeExpression()
1381 QualType Ty = Context.getObjCSelType(); in ParseObjCSelectorExpression()
1382 return new (Context) ObjCSelectorExpr(Ty, Sel, AtLoc, RParenLoc); in ParseObjCSelectorExpression()
1406 QualType Ty = Context.getObjCProtoType(); in ParseObjCProtocolExpression()
1409 Ty = Context.getObjCObjectPointerType(Ty); in ParseObjCProtocolExpression()
1410 return new (Context) ObjCProtocolExpr(Ty, PDecl, AtLoc, ProtoIdLoc, RParenLoc); in ParseObjCProtocolExpression()
1429 static QualType stripObjCInstanceType(ASTContext &Context, QualType T) { in stripObjCInstanceType() argument
1432 if (T == Context.getObjCInstanceType()) { in stripObjCInstanceType()
1433 return Context.getAttributedType( in stripObjCInstanceType()
1435 Context.getObjCIdType(), in stripObjCInstanceType()
1436 Context.getObjCIdType()); in stripObjCInstanceType()
1442 if (T == Context.getObjCInstanceType()) in stripObjCInstanceType()
1443 return Context.getObjCIdType(); in stripObjCInstanceType()
1462 ASTContext &Context = S.Context; in getBaseMessageSendResultType() local
1474 return Context.getAttributedType( in getBaseMessageSendResultType()
1488 return stripObjCInstanceType(Context, in getBaseMessageSendResultType()
1497 Context.getObjCObjectPointerType( in getBaseMessageSendResultType()
1498 Context.getObjCInterfaceType(Class))); in getBaseMessageSendResultType()
1504 return transferNullability(Context.getObjCObjectPointerType(ReceiverType)); in getBaseMessageSendResultType()
1509 return stripObjCInstanceType(Context, in getBaseMessageSendResultType()
1540 if (T == Context.getObjCInstanceType()) { in getMessageSendResultType()
1546 QualType NewResultType = Context.getObjCObjectPointerType( in getMessageSendResultType()
1547 Context.getObjCInterfaceType(MD->getClassInterface())); in getMessageSendResultType()
1549 NewResultType = Context.getAttributedType( in getMessageSendResultType()
1605 resultType = resultType.getDesugaredType(Context); in getMessageSendResultType()
1613 return Context.getAttributedType( in getMessageSendResultType()
1661 Context.hasSameUnqualifiedType(destType, MD->getReturnType())) in EmitRelatedResultTypeNoteForReturn()
1667 findExplicitInstancetypeDeclarer(MD, Context.getObjCInstanceType())) { in EmitRelatedResultTypeNoteForReturn()
1698 if (Context.hasSameUnqualifiedType( in EmitRelatedResultTypeNote()
1702 if (!Context.hasSameUnqualifiedType(Method->getReturnType(), in EmitRelatedResultTypeNote()
1703 Context.getObjCInstanceType())) in EmitRelatedResultTypeNote()
1784 ReturnType = Context.UnknownAnyTy; in CheckMessageArgumentTypes()
1786 ReturnType = Context.getObjCIdType(); in CheckMessageArgumentTypes()
1827 argExpr->IgnoreParenNoopCasts(Context))) in CheckMessageArgumentTypes()
1838 if (param->getType() == Context.UnknownAnyTy) { in CheckMessageArgumentTypes()
1856 Context, in CheckMessageArgumentTypes()
1866 = InitializedEntity::InitializeParameter(Context, param, paramType); in CheckMessageArgumentTypes()
2006 return new (Context) in HandleExprPropertyRefExpr()
2007 ObjCPropertyRefExpr(PD, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
2010 return new (Context) in HandleExprPropertyRefExpr()
2011 ObjCPropertyRefExpr(PD, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
2023 return new (Context) ObjCPropertyRefExpr( in HandleExprPropertyRefExpr()
2024 PD, Context.PseudoObjectTy, VK_LValue, OK_ObjCProperty, MemberLoc, in HandleExprPropertyRefExpr()
2027 return new (Context) in HandleExprPropertyRefExpr()
2028 ObjCPropertyRefExpr(PD, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
2093 return new (Context) in HandleExprPropertyRefExpr()
2094 ObjCPropertyRefExpr(Getter, Setter, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
2097 return new (Context) in HandleExprPropertyRefExpr()
2098 ObjCPropertyRefExpr(Getter, Setter, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
2183 QualType T = Context.getObjCObjectPointerType(SuperType); in ActOnClassPropertyRefExpr()
2249 return new (Context) in ActOnClassPropertyRefExpr()
2250 ObjCPropertyRefExpr(Getter, Setter, Context.PseudoObjectTy, VK_LValue, in ActOnClassPropertyRefExpr()
2254 return new (Context) ObjCPropertyRefExpr( in ActOnClassPropertyRefExpr()
2255 Getter, Setter, Context.PseudoObjectTy, VK_LValue, OK_ObjCProperty, in ActOnClassPropertyRefExpr()
2259 << &propertyName << Context.getObjCInterfaceType(IFace)); in ActOnClassPropertyRefExpr()
2339 T = Context.getObjCInterfaceType(Class); in getObjCMessageKind()
2341 T = Context.getTypeDeclType(Type); in getObjCMessageKind()
2349 TypeSourceInfo *TSInfo = Context.getTrivialTypeSourceInfo(T, NameLoc); in getObjCMessageKind()
2371 QualType T = Context.getObjCInterfaceType(Class); in getObjCMessageKind()
2372 TypeSourceInfo *TSInfo = Context.getTrivialTypeSourceInfo(T, NameLoc); in getObjCMessageKind()
2419 SuperTy = Context.getObjCObjectPointerType(SuperTy); in ActOnSuperMessage()
2441 receiverTypeInfo = Context.getTrivialTypeSourceInfo(ReceiverType); in BuildClassMessageImplicit()
2639 return ObjCMessageExpr::Create(Context, ReceiverType, VK_PRValue, LBracLoc, in BuildClassMessage()
2662 if (RequireCompleteType(Loc, Context.getObjCInterfaceType(Class), in BuildClassMessage()
2742 Context, ReturnType, VK, LBracLoc, SuperLoc, /*IsInstanceSuper=*/false, in BuildClassMessage()
2747 Context, ReturnType, VK, LBracLoc, ReceiverTypeInfo, Sel, SelectorLocs, in BuildClassMessage()
2774 ReceiverTypeInfo = Context.getTrivialTypeSourceInfo(ReceiverType, LBracLoc); in ActOnClassMessage()
2876 if (Receiver->getType() == Context.UnknownAnyTy) in BuildInstanceMessage()
2877 Result = forceUnknownAnyToType(Receiver, Context.getObjCIdType()); in BuildInstanceMessage()
2891 Context, Context.DependentTy, VK_PRValue, LBracLoc, Receiver, Sel, in BuildInstanceMessage()
2910 !Context.getObjCIdType().isNull() && in BuildInstanceMessage()
2917 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(), in BuildInstanceMessage()
2921 bool IsNull = Receiver->isNullPointerConstant(Context, in BuildInstanceMessage()
2924 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(), in BuildInstanceMessage()
2950 bool receiverIsIdLike = ReceiverType->isObjCIdOrObjectKindOfType(Context, in BuildInstanceMessage()
2953 (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) { in BuildInstanceMessage()
3331 Context, ReturnType, VK, LBracLoc, SuperLoc, /*IsInstanceSuper=*/true, in BuildInstanceMessage()
3336 Context, ReturnType, VK, LBracLoc, Receiver, Sel, SelectorLocs, Method, in BuildInstanceMessage()
3353 Context.getObjCInterfaceType(CurMeth->getClassInterface()); in BuildInstanceMessage()
3433 IdentifierInfo *SelectorId = &Context.Idents.get("respondsToSelector"); in ActOnInstanceMessage()
3434 RespondsToSelectorSel = Context.Selectors.getUnarySelector(SelectorId); in ActOnInstanceMessage()
3540 ASTContext &Context; member in __anond6eeefa80411::ARCCastChecker
3551 ARCCastChecker(ASTContext &Context, ARCConversionTypeClass source, in ARCCastChecker() argument
3553 : Context(Context), SourceClass(source), TargetClass(target), in ARCCastChecker()
3567 if (e->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull)) in VisitExpr()
3635 !var->hasDefinition(Context) && in VisitDeclRefExpr()
3640 if (Context.getSourceManager().isInSystemHeader(var->getLocation())) in VisitDeclRefExpr()
3744 LookupResult R(*this, &Context.Idents.get(name), SourceLocation(), in isKnownName()
3929 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
3970 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
4036 (S.Context.ObjCObjectAdoptsQTypeProtocols( in CheckObjCBridgeNSCast()
4103 (S.Context.QIdProtocolsAdoptObjCObjectProtocols( in CheckObjCBridgeCFCast()
4269 Selector Sel = Context.Selectors.getUnarySelector(CMId); in checkObjCBridgeRelatedComponents()
4283 Selector Sel = Context.Selectors.getNullarySelector(IMId); in checkObjCBridgeRelatedComponents()
4336 QualType receiverType = Context.getObjCInterfaceType(RelatedClass); in CheckObjCBridgeRelatedConversions()
4444 if (castACTC == ACTC_none && castType->isIntegralType(Context)) in CheckObjCConversion()
4461 switch (ARCCastChecker(Context, exprACTC, castACTC, false).Visit(castExpr)) { in CheckObjCConversion()
4473 castExpr = ImplicitCastExpr::Create(Context, castExpr->getType(), in CheckObjCConversion()
4549 return new (Context) ParenExpr(pe->getLParen(), pe->getRParen(), sub); in stripARCUnbridgedCast()
4553 return UnaryOperator::Create(Context, sub, UO_Extension, sub->getType(), in stripARCUnbridgedCast()
4575 Context, gse->getGenericLoc(), gse->getControllingExpr(), subTypes, in stripARCUnbridgedCast()
4587 Context.getCanonicalType(castType).getUnqualifiedType(); in CheckObjCARCUnavailableWeakConversion()
4589 Context.getCanonicalType(exprType).getUnqualifiedType(); in CheckObjCARCUnavailableWeakConversion()
4702 SubExpr = ImplicitCastExpr::Create(Context, FromType, CK_ARCProduceObject, in BuildObjCBridgedCast()
4736 Expr *Result = new (Context) ObjCBridgedCastExpr(LParenLoc, Kind, CK, in BuildObjCBridgedCast()
4742 Result = ImplicitCastExpr::Create(Context, T, CK_ARCConsumeObject, Result, in BuildObjCBridgedCast()
4761 TSInfo = Context.getTrivialTypeSourceInfo(T, LParenLoc); in ActOnObjCBridgedCast()