Lines Matching refs:Context
67 const ConstantArrayType *CAT = Context.getAsConstantArrayType(S->getType()); in ParseObjCStringLiteral()
69 QualType StrTy = Context.getConstantArrayType( in ParseObjCStringLiteral()
72 S = StringLiteral::Create(Context, StrBuf, StringLiteral::Ascii, in ParseObjCStringLiteral()
89 QualType Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
91 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
97 NSIdent = &Context.Idents.get("NSConstantString"); in BuildObjCStringLiteral()
99 NSIdent = &Context.Idents.get(StringClass); in BuildObjCStringLiteral()
104 Context.setObjCConstantStringInterface(StrIF); in BuildObjCStringLiteral()
105 Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
106 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
112 Ty = Context.getObjCIdType(); in BuildObjCStringLiteral()
119 Context.setObjCConstantStringInterface(StrIF); in BuildObjCStringLiteral()
120 Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
121 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
127 Ty = Context.getObjCNSStringType(); in BuildObjCStringLiteral()
130 ObjCInterfaceDecl::Create (Context, in BuildObjCStringLiteral()
131 Context.getTranslationUnitDecl(), in BuildObjCStringLiteral()
134 Ty = Context.getObjCInterfaceType(NSStringIDecl); in BuildObjCStringLiteral()
135 Context.setObjCNSStringType(Ty); in BuildObjCStringLiteral()
137 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
141 return new (Context) ObjCStringLiteral(S, Ty, AtLoc); in BuildObjCStringLiteral()
226 ASTContext &Context = S.Context; in LookupObjCInterfaceDeclForLiteral() local
227 TranslationUnitDecl *TU = Context.getTranslationUnitDecl(); in LookupObjCInterfaceDeclForLiteral()
228 ID = ObjCInterfaceDecl::Create (Context, TU, SourceLocation(), II, in LookupObjCInterfaceDeclForLiteral()
263 ASTContext &CX = S.Context; in getNSNumberFactoryMethod()
294 ParmVarDecl *value = ParmVarDecl::Create(S.Context, Method, in getNSNumberFactoryMethod()
299 Method->setMethodParams(S.Context, value, None); in getNSNumberFactoryMethod()
323 NumberType = Context.CharTy; in BuildObjCNumericLiteral()
327 NumberType = Context.getWideCharType(); in BuildObjCNumericLiteral()
331 NumberType = Context.Char16Ty; in BuildObjCNumericLiteral()
335 NumberType = Context.Char32Ty; in BuildObjCNumericLiteral()
350 InitializedEntity Entity = InitializedEntity::InitializeParameter(Context, in BuildObjCNumericLiteral()
361 new (Context) ObjCBoxedExpr(Number, NSNumberPointer, Method, in BuildObjCNumericLiteral()
375 Inner = ImpCastExprToType(Inner.get(), Context.BoolTy, in ActOnObjCBoolLiteral()
400 = InitializedEntity::InitializeParameter(S.Context, T, in CheckObjCCollectionLiteralElement()
493 InitializedEntity::InitializeParameter(S.Context, T, in CheckObjCCollectionLiteralElement()
501 new (Context) ObjCBoxedExpr(ValueExpr, Context.DependentTy, nullptr, SR); in BuildObjCBoxedExpr()
516 if (Context.hasSameUnqualifiedType(PointeeType, Context.CharTy)) { in BuildObjCBoxedExpr()
524 QualType NSStringObject = Context.getObjCInterfaceType(NSStringDecl); in BuildObjCBoxedExpr()
525 NSStringPointer = Context.getObjCObjectPointerType(NSStringObject); in BuildObjCBoxedExpr()
529 IdentifierInfo *II = &Context.Idents.get("stringWithUTF8String"); in BuildObjCBoxedExpr()
530 Selector stringWithUTF8String = Context.Selectors.getUnarySelector(II); in BuildObjCBoxedExpr()
538 Context, SourceLocation(), SourceLocation(), stringWithUTF8String, in BuildObjCBoxedExpr()
545 QualType ConstCharType = Context.CharTy.withConst(); in BuildObjCBoxedExpr()
547 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
549 &Context.Idents.get("value"), in BuildObjCBoxedExpr()
550 Context.getPointerType(ConstCharType), in BuildObjCBoxedExpr()
553 M->setMethodParams(Context, value, None); in BuildObjCBoxedExpr()
568 BoxingMethod->getReturnType()->getNullability(Context); in BuildObjCBoxedExpr()
570 BoxedType = Context.getAttributedType( in BuildObjCBoxedExpr()
588 ValueType = Context.CharTy; in BuildObjCBoxedExpr()
592 ValueType = Context.getWideCharType(); in BuildObjCBoxedExpr()
596 ValueType = Context.Char16Ty; in BuildObjCBoxedExpr()
600 ValueType = Context.Char32Ty; in BuildObjCBoxedExpr()
633 QualType NSValueObject = Context.getObjCInterfaceType(NSValueDecl); in BuildObjCBoxedExpr()
634 NSValuePointer = Context.getObjCObjectPointerType(NSValueObject); in BuildObjCBoxedExpr()
639 &Context.Idents.get("valueWithBytes"), in BuildObjCBoxedExpr()
640 &Context.Idents.get("objCType") in BuildObjCBoxedExpr()
642 Selector ValueWithBytesObjCType = Context.Selectors.getSelector(2, II); in BuildObjCBoxedExpr()
650 Context, in BuildObjCBoxedExpr()
668 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
670 &Context.Idents.get("bytes"), in BuildObjCBoxedExpr()
671 Context.VoidPtrTy.withConst(), in BuildObjCBoxedExpr()
676 QualType ConstCharType = Context.CharTy.withConst(); in BuildObjCBoxedExpr()
678 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
680 &Context.Idents.get("type"), in BuildObjCBoxedExpr()
681 Context.getPointerType(ConstCharType), in BuildObjCBoxedExpr()
686 M->setMethodParams(Context, Params, None); in BuildObjCBoxedExpr()
697 if (!ValueType.isTriviallyCopyableType(Context)) { in BuildObjCBoxedExpr()
723 InitializedEntity IE = InitializedEntity::InitializeParameter(Context, in BuildObjCBoxedExpr()
734 new (Context) ObjCBoxedExpr(ValueExpr, BoxedType, in BuildObjCBoxedExpr()
766 return new (Context) ObjCSubscriptRefExpr( in BuildObjCSubscriptExpression()
767 BaseExpr, IndexExpr, Context.PseudoObjectTy, VK_LValue, OK_ObjCSubscript, in BuildObjCSubscriptExpression()
783 QualType IdT = Context.getObjCIdType(); in BuildObjCArrayLiteral()
791 Context, SourceLocation(), SourceLocation(), Sel, IdT, ReturnTInfo, in BuildObjCArrayLiteral()
792 Context.getTranslationUnitDecl(), false /*Instance*/, in BuildObjCArrayLiteral()
798 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
801 &Context.Idents.get("objects"), in BuildObjCArrayLiteral()
802 Context.getPointerType(IdT), in BuildObjCArrayLiteral()
806 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
809 &Context.Idents.get("cnt"), in BuildObjCArrayLiteral()
810 Context.UnsignedLongTy, in BuildObjCArrayLiteral()
814 Method->setMethodParams(Context, Params, None); in BuildObjCArrayLiteral()
824 !Context.hasSameUnqualifiedType(PtrT->getPointeeType(), IdT)) { in BuildObjCArrayLiteral()
830 << Context.getPointerType(IdT.withConst()); in BuildObjCArrayLiteral()
867 = Context.getObjCObjectPointerType( in BuildObjCArrayLiteral()
868 Context.getObjCInterfaceType(NSArrayDecl)); in BuildObjCArrayLiteral()
871 ObjCArrayLiteral::Create(Context, Elements, Ty, in BuildObjCArrayLiteral()
889 QualType IdT = Context.getObjCIdType(); in BuildObjCDictionaryLiteral()
895 Method = ObjCMethodDecl::Create(Context, in BuildObjCDictionaryLiteral()
899 Context.getTranslationUnitDecl(), in BuildObjCDictionaryLiteral()
906 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
909 &Context.Idents.get("objects"), in BuildObjCDictionaryLiteral()
910 Context.getPointerType(IdT), in BuildObjCDictionaryLiteral()
914 ParmVarDecl *keys = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
917 &Context.Idents.get("keys"), in BuildObjCDictionaryLiteral()
918 Context.getPointerType(IdT), in BuildObjCDictionaryLiteral()
922 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
925 &Context.Idents.get("cnt"), in BuildObjCDictionaryLiteral()
926 Context.UnsignedLongTy, in BuildObjCDictionaryLiteral()
930 Method->setMethodParams(Context, Params, None); in BuildObjCDictionaryLiteral()
941 !Context.hasSameUnqualifiedType(PtrValue->getPointeeType(), IdT)) { in BuildObjCDictionaryLiteral()
947 << Context.getPointerType(IdT.withConst()); in BuildObjCDictionaryLiteral()
955 !Context.hasSameUnqualifiedType(PtrKey->getPointeeType(), in BuildObjCDictionaryLiteral()
962 LookupProtocol(&Context.Idents.get("NSCopying"), SR.getBegin())) { in BuildObjCDictionaryLiteral()
965 Context.getObjCObjectType(Context.ObjCBuiltinIdTy, { }, in BuildObjCDictionaryLiteral()
970 QIDNSCopying = Context.getObjCObjectPointerType(QIDNSCopying); in BuildObjCDictionaryLiteral()
974 err = !Context.hasSameUnqualifiedType(PtrKey->getPointeeType(), in BuildObjCDictionaryLiteral()
984 << Context.getPointerType(IdT.withConst()); in BuildObjCDictionaryLiteral()
1045 = Context.getObjCObjectPointerType( in BuildObjCDictionaryLiteral()
1046 Context.getObjCInterfaceType(NSDictionaryDecl)); in BuildObjCDictionaryLiteral()
1048 Context, Elements, HasPackExpansions, Ty, in BuildObjCDictionaryLiteral()
1058 StrTy = Context.DependentTy; in BuildObjCEncodeExpression()
1069 Context.getObjCEncodingForType(EncodedType, Str, nullptr, &NotEncodedT); in BuildObjCEncodeExpression()
1076 StrTy = Context.CharTy; in BuildObjCEncodeExpression()
1080 StrTy = Context.getConstantArrayType(StrTy, llvm::APInt(32, Str.size()+1), in BuildObjCEncodeExpression()
1084 return new (Context) ObjCEncodeExpr(StrTy, EncodedTypeInfo, AtLoc, RParenLoc); in BuildObjCEncodeExpression()
1096 TInfo = Context.getTrivialTypeSourceInfo(EncodedType, in ParseObjCEncodeExpression()
1215 QualType Ty = Context.getObjCSelType(); in ParseObjCSelectorExpression()
1216 return new (Context) ObjCSelectorExpr(Ty, Sel, AtLoc, RParenLoc); in ParseObjCSelectorExpression()
1237 QualType Ty = Context.getObjCProtoType(); in ParseObjCProtocolExpression()
1240 Ty = Context.getObjCObjectPointerType(Ty); in ParseObjCProtocolExpression()
1241 return new (Context) ObjCProtocolExpr(Ty, PDecl, AtLoc, ProtoIdLoc, RParenLoc); in ParseObjCProtocolExpression()
1260 static QualType stripObjCInstanceType(ASTContext &Context, QualType T) { in stripObjCInstanceType() argument
1263 if (T == Context.getObjCInstanceType()) { in stripObjCInstanceType()
1264 return Context.getAttributedType( in stripObjCInstanceType()
1266 Context.getObjCIdType(), in stripObjCInstanceType()
1267 Context.getObjCIdType()); in stripObjCInstanceType()
1273 if (T == Context.getObjCInstanceType()) in stripObjCInstanceType()
1274 return Context.getObjCIdType(); in stripObjCInstanceType()
1293 ASTContext &Context = S.Context; in getBaseMessageSendResultType() local
1300 ->getNullability(Context)){ in getBaseMessageSendResultType()
1305 return Context.getAttributedType( in getBaseMessageSendResultType()
1319 return stripObjCInstanceType(Context, in getBaseMessageSendResultType()
1328 Context.getObjCObjectPointerType( in getBaseMessageSendResultType()
1329 Context.getObjCInterfaceType(Class))); in getBaseMessageSendResultType()
1335 return transferNullability(Context.getObjCObjectPointerType(ReceiverType)); in getBaseMessageSendResultType()
1340 return stripObjCInstanceType(Context, in getBaseMessageSendResultType()
1371 if (T == Context.getObjCInstanceType()) { in getMessageSendResultType()
1377 QualType NewResultType = Context.getObjCObjectPointerType( in getMessageSendResultType()
1378 Context.getObjCInterfaceType(MD->getClassInterface())); in getMessageSendResultType()
1379 if (auto Nullability = resultType->getNullability(Context)) in getMessageSendResultType()
1380 NewResultType = Context.getAttributedType( in getMessageSendResultType()
1396 if (auto nullability = ReceiverType->getNullability(Context)) in getMessageSendResultType()
1400 if (auto nullability = resultType->getNullability(Context)) in getMessageSendResultType()
1428 resultType = resultType.getDesugaredType(Context); in getMessageSendResultType()
1430 } while (resultType->getNullability(Context)); in getMessageSendResultType()
1436 return Context.getAttributedType( in getMessageSendResultType()
1484 Context.hasSameUnqualifiedType(destType, MD->getReturnType())) in EmitRelatedResultTypeNoteForReturn()
1490 findExplicitInstancetypeDeclarer(MD, Context.getObjCInstanceType())) { in EmitRelatedResultTypeNoteForReturn()
1521 if (Context.hasSameUnqualifiedType( in EmitRelatedResultTypeNote()
1525 if (!Context.hasSameUnqualifiedType(Method->getReturnType(), in EmitRelatedResultTypeNote()
1526 Context.getObjCInstanceType())) in EmitRelatedResultTypeNote()
1608 ReturnType = Context.UnknownAnyTy; in CheckMessageArgumentTypes()
1610 ReturnType = Context.getObjCIdType(); in CheckMessageArgumentTypes()
1649 argExpr->IgnoreParenNoopCasts(Context))) in CheckMessageArgumentTypes()
1660 if (param->getType() == Context.UnknownAnyTy) { in CheckMessageArgumentTypes()
1678 Context, in CheckMessageArgumentTypes()
1688 = InitializedEntity::InitializeParameter(Context, param, paramType); in CheckMessageArgumentTypes()
1828 return new (Context) in HandleExprPropertyRefExpr()
1829 ObjCPropertyRefExpr(PD, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
1832 return new (Context) in HandleExprPropertyRefExpr()
1833 ObjCPropertyRefExpr(PD, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
1845 return new (Context) ObjCPropertyRefExpr( in HandleExprPropertyRefExpr()
1846 PD, Context.PseudoObjectTy, VK_LValue, OK_ObjCProperty, MemberLoc, in HandleExprPropertyRefExpr()
1849 return new (Context) in HandleExprPropertyRefExpr()
1850 ObjCPropertyRefExpr(PD, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
1914 return new (Context) in HandleExprPropertyRefExpr()
1915 ObjCPropertyRefExpr(Getter, Setter, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
1918 return new (Context) in HandleExprPropertyRefExpr()
1919 ObjCPropertyRefExpr(Getter, Setter, Context.PseudoObjectTy, VK_LValue, in HandleExprPropertyRefExpr()
2005 QualType T = Context.getObjCObjectPointerType(SuperType); in ActOnClassPropertyRefExpr()
2071 return new (Context) in ActOnClassPropertyRefExpr()
2072 ObjCPropertyRefExpr(Getter, Setter, Context.PseudoObjectTy, VK_LValue, in ActOnClassPropertyRefExpr()
2076 return new (Context) ObjCPropertyRefExpr( in ActOnClassPropertyRefExpr()
2077 Getter, Setter, Context.PseudoObjectTy, VK_LValue, OK_ObjCProperty, in ActOnClassPropertyRefExpr()
2081 << &propertyName << Context.getObjCInterfaceType(IFace)); in ActOnClassPropertyRefExpr()
2157 T = Context.getObjCInterfaceType(Class); in getObjCMessageKind()
2159 T = Context.getTypeDeclType(Type); in getObjCMessageKind()
2167 TypeSourceInfo *TSInfo = Context.getTrivialTypeSourceInfo(T, NameLoc); in getObjCMessageKind()
2189 QualType T = Context.getObjCInterfaceType(Class); in getObjCMessageKind()
2190 TypeSourceInfo *TSInfo = Context.getTrivialTypeSourceInfo(T, NameLoc); in getObjCMessageKind()
2237 SuperTy = Context.getObjCObjectPointerType(SuperTy); in ActOnSuperMessage()
2259 receiverTypeInfo = Context.getTrivialTypeSourceInfo(ReceiverType); in BuildClassMessageImplicit()
2456 Context, ReceiverType, VK_RValue, LBracLoc, ReceiverTypeInfo, Sel, in BuildClassMessage()
2478 if (RequireCompleteType(Loc, Context.getObjCInterfaceType(Class), in BuildClassMessage()
2547 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildClassMessage()
2553 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildClassMessage()
2582 ReceiverTypeInfo = Context.getTrivialTypeSourceInfo(ReceiverType, LBracLoc); in ActOnClassMessage()
2684 if (Receiver->getType() == Context.UnknownAnyTy) in BuildInstanceMessage()
2685 Result = forceUnknownAnyToType(Receiver, Context.getObjCIdType()); in BuildInstanceMessage()
2699 Context, Context.DependentTy, VK_RValue, LBracLoc, Receiver, Sel, in BuildInstanceMessage()
2718 !Context.getObjCIdType().isNull() && in BuildInstanceMessage()
2727 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(), in BuildInstanceMessage()
2731 bool IsNull = Receiver->isNullPointerConstant(Context, in BuildInstanceMessage()
2734 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(), in BuildInstanceMessage()
2763 bool receiverIsIdLike = ReceiverType->isObjCIdOrObjectKindOfType(Context, in BuildInstanceMessage()
2766 (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) { in BuildInstanceMessage()
3103 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildInstanceMessage()
3109 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildInstanceMessage()
3128 Context.getObjCInterfaceType(CurMeth->getClassInterface()); in BuildInstanceMessage()
3208 IdentifierInfo *SelectorId = &Context.Idents.get("respondsToSelector"); in ActOnInstanceMessage()
3209 RespondsToSelectorSel = Context.Selectors.getUnarySelector(SelectorId); in ActOnInstanceMessage()
3315 ASTContext &Context; member in __anon375345810311::ARCCastChecker
3326 ARCCastChecker(ASTContext &Context, ARCConversionTypeClass source, in ARCCastChecker() argument
3328 : Context(Context), SourceClass(source), TargetClass(target), in ARCCastChecker()
3342 if (e->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull)) in VisitExpr()
3410 !var->hasDefinition(Context) && in VisitDeclRefExpr()
3415 if (Context.getSourceManager().isInSystemHeader(var->getLocation())) in VisitDeclRefExpr()
3519 LookupResult R(*this, &Context.Idents.get(name), SourceLocation(), in isKnownName()
3705 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
3746 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
3813 (S.Context.ObjCObjectAdoptsQTypeProtocols( in CheckObjCBridgeNSCast()
3882 (S.Context.QIdProtocolsAdoptObjCObjectProtocols( in CheckObjCBridgeCFCast()
4048 Selector Sel = Context.Selectors.getUnarySelector(CMId); in checkObjCBridgeRelatedComponents()
4062 Selector Sel = Context.Selectors.getNullarySelector(IMId); in checkObjCBridgeRelatedComponents()
4115 QualType receiverType = Context.getObjCInterfaceType(RelatedClass); in CheckObjCBridgeRelatedConversions()
4225 if (castACTC == ACTC_none && castType->isIntegralType(Context)) in CheckObjCConversion()
4237 switch (ARCCastChecker(Context, exprACTC, castACTC, false).Visit(castExpr)) { in CheckObjCConversion()
4249 castExpr = ImplicitCastExpr::Create(Context, castExpr->getType(), in CheckObjCConversion()
4325 return new (Context) ParenExpr(pe->getLParen(), pe->getRParen(), sub); in stripARCUnbridgedCast()
4329 return new (Context) in stripARCUnbridgedCast()
4346 return new (Context) GenericSelectionExpr(Context, gse->getGenericLoc(), in stripARCUnbridgedCast()
4362 Context.getCanonicalType(castType).getUnqualifiedType(); in CheckObjCARCUnavailableWeakConversion()
4364 Context.getCanonicalType(exprType).getUnqualifiedType(); in CheckObjCARCUnavailableWeakConversion()
4477 SubExpr = ImplicitCastExpr::Create(Context, FromType, in BuildObjCBridgedCast()
4511 Expr *Result = new (Context) ObjCBridgedCastExpr(LParenLoc, Kind, CK, in BuildObjCBridgedCast()
4517 Result = ImplicitCastExpr::Create(Context, T, CK_ARCConsumeObject, Result, in BuildObjCBridgedCast()
4536 TSInfo = Context.getTrivialTypeSourceInfo(T, LParenLoc); in ActOnObjCBridgedCast()