Lines Matching refs:Context
68 const ConstantArrayType *CAT = Context.getAsConstantArrayType(S->getType()); in ParseObjCStringLiteral()
70 QualType StrTy = Context.getConstantArrayType( in ParseObjCStringLiteral()
73 S = StringLiteral::Create(Context, StrBuf, StringLiteral::Ascii, in ParseObjCStringLiteral()
90 QualType Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
92 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
98 NSIdent = &Context.Idents.get("NSConstantString"); in BuildObjCStringLiteral()
100 NSIdent = &Context.Idents.get(StringClass); in BuildObjCStringLiteral()
105 Context.setObjCConstantStringInterface(StrIF); in BuildObjCStringLiteral()
106 Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
107 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
113 Ty = Context.getObjCIdType(); in BuildObjCStringLiteral()
120 Context.setObjCConstantStringInterface(StrIF); in BuildObjCStringLiteral()
121 Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
122 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
128 Ty = Context.getObjCNSStringType(); in BuildObjCStringLiteral()
131 ObjCInterfaceDecl::Create (Context, in BuildObjCStringLiteral()
132 Context.getTranslationUnitDecl(), in BuildObjCStringLiteral()
135 Ty = Context.getObjCInterfaceType(NSStringIDecl); in BuildObjCStringLiteral()
136 Context.setObjCNSStringType(Ty); in BuildObjCStringLiteral()
138 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
142 return new (Context) ObjCStringLiteral(S, Ty, AtLoc); in BuildObjCStringLiteral()
227 ASTContext &Context = S.Context; in LookupObjCInterfaceDeclForLiteral() local
228 TranslationUnitDecl *TU = Context.getTranslationUnitDecl(); in LookupObjCInterfaceDeclForLiteral()
229 ID = ObjCInterfaceDecl::Create (Context, TU, SourceLocation(), II, in LookupObjCInterfaceDeclForLiteral()
264 ASTContext &CX = S.Context; in getNSNumberFactoryMethod()
296 ParmVarDecl *value = ParmVarDecl::Create(S.Context, Method, in getNSNumberFactoryMethod()
301 Method->setMethodParams(S.Context, value, None); in getNSNumberFactoryMethod()
325 NumberType = Context.CharTy; in BuildObjCNumericLiteral()
329 NumberType = Context.getWideCharType(); in BuildObjCNumericLiteral()
333 NumberType = Context.Char16Ty; in BuildObjCNumericLiteral()
337 NumberType = Context.Char32Ty; in BuildObjCNumericLiteral()
352 InitializedEntity Entity = InitializedEntity::InitializeParameter(Context, in BuildObjCNumericLiteral()
363 new (Context) ObjCBoxedExpr(Number, NSNumberPointer, Method, in BuildObjCNumericLiteral()
377 Inner = ImpCastExprToType(Inner.get(), Context.BoolTy, in ActOnObjCBoolLiteral()
402 = InitializedEntity::InitializeParameter(S.Context, T, in CheckObjCCollectionLiteralElement()
495 InitializedEntity::InitializeParameter(S.Context, T, in CheckObjCCollectionLiteralElement()
503 new (Context) ObjCBoxedExpr(ValueExpr, Context.DependentTy, nullptr, SR); in BuildObjCBoxedExpr()
518 if (Context.hasSameUnqualifiedType(PointeeType, Context.CharTy)) { in BuildObjCBoxedExpr()
526 QualType NSStringObject = Context.getObjCInterfaceType(NSStringDecl); in BuildObjCBoxedExpr()
527 NSStringPointer = Context.getObjCObjectPointerType(NSStringObject); in BuildObjCBoxedExpr()
543 BoxedType = Context.getAttributedType( in BuildObjCBoxedExpr()
547 return new (Context) ObjCBoxedExpr(CE, BoxedType, nullptr, SR); in BuildObjCBoxedExpr()
555 IdentifierInfo *II = &Context.Idents.get("stringWithUTF8String"); in BuildObjCBoxedExpr()
556 Selector stringWithUTF8String = Context.Selectors.getUnarySelector(II); in BuildObjCBoxedExpr()
564 Context, SourceLocation(), SourceLocation(), stringWithUTF8String, in BuildObjCBoxedExpr()
572 QualType ConstCharType = Context.CharTy.withConst(); in BuildObjCBoxedExpr()
574 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
576 &Context.Idents.get("value"), in BuildObjCBoxedExpr()
577 Context.getPointerType(ConstCharType), in BuildObjCBoxedExpr()
580 M->setMethodParams(Context, value, None); in BuildObjCBoxedExpr()
595 BoxingMethod->getReturnType()->getNullability(Context); in BuildObjCBoxedExpr()
597 BoxedType = Context.getAttributedType( in BuildObjCBoxedExpr()
615 ValueType = Context.CharTy; in BuildObjCBoxedExpr()
619 ValueType = Context.getWideCharType(); in BuildObjCBoxedExpr()
623 ValueType = Context.Char16Ty; in BuildObjCBoxedExpr()
627 ValueType = Context.Char32Ty; in BuildObjCBoxedExpr()
660 QualType NSValueObject = Context.getObjCInterfaceType(NSValueDecl); in BuildObjCBoxedExpr()
661 NSValuePointer = Context.getObjCObjectPointerType(NSValueObject); in BuildObjCBoxedExpr()
666 &Context.Idents.get("valueWithBytes"), in BuildObjCBoxedExpr()
667 &Context.Idents.get("objCType") in BuildObjCBoxedExpr()
669 Selector ValueWithBytesObjCType = Context.Selectors.getSelector(2, II); in BuildObjCBoxedExpr()
677 Context, SourceLocation(), SourceLocation(), ValueWithBytesObjCType, in BuildObjCBoxedExpr()
690 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
692 &Context.Idents.get("bytes"), in BuildObjCBoxedExpr()
693 Context.VoidPtrTy.withConst(), in BuildObjCBoxedExpr()
698 QualType ConstCharType = Context.CharTy.withConst(); in BuildObjCBoxedExpr()
700 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
702 &Context.Idents.get("type"), in BuildObjCBoxedExpr()
703 Context.getPointerType(ConstCharType), in BuildObjCBoxedExpr()
708 M->setMethodParams(Context, Params, None); in BuildObjCBoxedExpr()
719 if (!ValueType.isTriviallyCopyableType(Context)) { in BuildObjCBoxedExpr()
745 InitializedEntity IE = InitializedEntity::InitializeParameter(Context, in BuildObjCBoxedExpr()
756 new (Context) ObjCBoxedExpr(ValueExpr, BoxedType, in BuildObjCBoxedExpr()
788 return new (Context) ObjCSubscriptRefExpr( in BuildObjCSubscriptExpression()
789 BaseExpr, IndexExpr, Context.PseudoObjectTy, VK_LValue, OK_ObjCSubscript, in BuildObjCSubscriptExpression()
805 QualType IdT = Context.getObjCIdType(); in BuildObjCArrayLiteral()
813 Context, SourceLocation(), SourceLocation(), Sel, IdT, ReturnTInfo, in BuildObjCArrayLiteral()
814 Context.getTranslationUnitDecl(), false /*Instance*/, in BuildObjCArrayLiteral()
820 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
823 &Context.Idents.get("objects"), in BuildObjCArrayLiteral()
824 Context.getPointerType(IdT), in BuildObjCArrayLiteral()
828 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
831 &Context.Idents.get("cnt"), in BuildObjCArrayLiteral()
832 Context.UnsignedLongTy, in BuildObjCArrayLiteral()
836 Method->setMethodParams(Context, Params, None); in BuildObjCArrayLiteral()
846 !Context.hasSameUnqualifiedType(PtrT->getPointeeType(), IdT)) { in BuildObjCArrayLiteral()
852 << Context.getPointerType(IdT.withConst()); in BuildObjCArrayLiteral()
889 = Context.getObjCObjectPointerType( in BuildObjCArrayLiteral()
890 Context.getObjCInterfaceType(NSArrayDecl)); in BuildObjCArrayLiteral()
893 ObjCArrayLiteral::Create(Context, Elements, Ty, in BuildObjCArrayLiteral()
967 QualType IdT = Context.getObjCIdType(); in BuildObjCDictionaryLiteral()
974 Context, SourceLocation(), SourceLocation(), Sel, IdT, in BuildObjCDictionaryLiteral()
975 nullptr /*TypeSourceInfo */, Context.getTranslationUnitDecl(), in BuildObjCDictionaryLiteral()
982 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
985 &Context.Idents.get("objects"), in BuildObjCDictionaryLiteral()
986 Context.getPointerType(IdT), in BuildObjCDictionaryLiteral()
990 ParmVarDecl *keys = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
993 &Context.Idents.get("keys"), in BuildObjCDictionaryLiteral()
994 Context.getPointerType(IdT), in BuildObjCDictionaryLiteral()
998 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
1001 &Context.Idents.get("cnt"), in BuildObjCDictionaryLiteral()
1002 Context.UnsignedLongTy, in BuildObjCDictionaryLiteral()
1006 Method->setMethodParams(Context, Params, None); in BuildObjCDictionaryLiteral()
1017 !Context.hasSameUnqualifiedType(PtrValue->getPointeeType(), IdT)) { in BuildObjCDictionaryLiteral()
1023 << Context.getPointerType(IdT.withConst()); in BuildObjCDictionaryLiteral()
1031 !Context.hasSameUnqualifiedType(PtrKey->getPointeeType(), in BuildObjCDictionaryLiteral()
1038 LookupProtocol(&Context.Idents.get("NSCopying"), SR.getBegin())) { in BuildObjCDictionaryLiteral()
1041 Context.getObjCObjectType(Context.ObjCBuiltinIdTy, { }, in BuildObjCDictionaryLiteral()
1046 QIDNSCopying = Context.getObjCObjectPointerType(QIDNSCopying); in BuildObjCDictionaryLiteral()
1050 err = !Context.hasSameUnqualifiedType(PtrKey->getPointeeType(), in BuildObjCDictionaryLiteral()
1060 << Context.getPointerType(IdT.withConst()); in BuildObjCDictionaryLiteral()
1120 QualType Ty = Context.getObjCObjectPointerType( in BuildObjCDictionaryLiteral()
1121 Context.getObjCInterfaceType(NSDictionaryDecl)); in BuildObjCDictionaryLiteral()
1124 ObjCDictionaryLiteral::Create(Context, Elements, HasPackExpansions, Ty, in BuildObjCDictionaryLiteral()
1136 StrTy = Context.DependentTy; in BuildObjCEncodeExpression()
1147 Context.getObjCEncodingForType(EncodedType, Str, nullptr, &NotEncodedT); in BuildObjCEncodeExpression()
1154 StrTy = Context.getStringLiteralArrayType(Context.CharTy, Str.size()); in BuildObjCEncodeExpression()
1157 return new (Context) ObjCEncodeExpr(StrTy, EncodedTypeInfo, AtLoc, RParenLoc); in BuildObjCEncodeExpression()
1169 TInfo = Context.getTrivialTypeSourceInfo(EncodedType, in ParseObjCEncodeExpression()
1382 QualType Ty = Context.getObjCSelType(); in ParseObjCSelectorExpression()
1383 return new (Context) ObjCSelectorExpr(Ty, Sel, AtLoc, RParenLoc); in ParseObjCSelectorExpression()
1407 QualType Ty = Context.getObjCProtoType(); in ParseObjCProtocolExpression()
1410 Ty = Context.getObjCObjectPointerType(Ty); in ParseObjCProtocolExpression()
1411 return new (Context) ObjCProtocolExpr(Ty, PDecl, AtLoc, ProtoIdLoc, RParenLoc); in ParseObjCProtocolExpression()
1430 static QualType stripObjCInstanceType(ASTContext &Context, QualType T) { in stripObjCInstanceType() argument
1433 if (T == Context.getObjCInstanceType()) { in stripObjCInstanceType()
1434 return Context.getAttributedType( in stripObjCInstanceType()
1436 Context.getObjCIdType(), in stripObjCInstanceType()
1437 Context.getObjCIdType()); in stripObjCInstanceType()
1443 if (T == Context.getObjCInstanceType()) in stripObjCInstanceType()
1444 return Context.getObjCIdType(); in stripObjCInstanceType()
1463 ASTContext &Context = S.Context; in getBaseMessageSendResultType() local
1470 ->getNullability(Context)){ in getBaseMessageSendResultType()
1475 return Context.getAttributedType( in getBaseMessageSendResultType()
1489 return stripObjCInstanceType(Context, in getBaseMessageSendResultType()
1498 Context.getObjCObjectPointerType( in getBaseMessageSendResultType()
1499 Context.getObjCInterfaceType(Class))); in getBaseMessageSendResultType()
1505 return transferNullability(Context.getObjCObjectPointerType(ReceiverType)); in getBaseMessageSendResultType()
1510 return stripObjCInstanceType(Context, in getBaseMessageSendResultType()
1541 if (T == Context.getObjCInstanceType()) { in getMessageSendResultType()
1547 QualType NewResultType = Context.getObjCObjectPointerType( in getMessageSendResultType()
1548 Context.getObjCInterfaceType(MD->getClassInterface())); in getMessageSendResultType()
1549 if (auto Nullability = resultType->getNullability(Context)) in getMessageSendResultType()
1550 NewResultType = Context.getAttributedType( in getMessageSendResultType()
1567 ReceiverType->getNullability(Context)) { in getMessageSendResultType()
1575 resultType->getNullability(Context)) { in getMessageSendResultType()
1606 resultType = resultType.getDesugaredType(Context); in getMessageSendResultType()
1608 } while (resultType->getNullability(Context)); in getMessageSendResultType()
1614 return Context.getAttributedType( in getMessageSendResultType()
1662 Context.hasSameUnqualifiedType(destType, MD->getReturnType())) in EmitRelatedResultTypeNoteForReturn()
1668 findExplicitInstancetypeDeclarer(MD, Context.getObjCInstanceType())) { in EmitRelatedResultTypeNoteForReturn()
1699 if (Context.hasSameUnqualifiedType( in EmitRelatedResultTypeNote()
1703 if (!Context.hasSameUnqualifiedType(Method->getReturnType(), in EmitRelatedResultTypeNote()
1704 Context.getObjCInstanceType())) in EmitRelatedResultTypeNote()
1785 ReturnType = Context.UnknownAnyTy; in CheckMessageArgumentTypes()
1787 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()
2637 Context, ReceiverType, VK_PRValue, LBracLoc, ReceiverTypeInfo, Sel, in BuildClassMessage()
2659 if (RequireCompleteType(Loc, Context.getObjCInterfaceType(Class), in BuildClassMessage()
2738 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildClassMessage()
2744 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildClassMessage()
2773 ReceiverTypeInfo = Context.getTrivialTypeSourceInfo(ReceiverType, LBracLoc); in ActOnClassMessage()
2875 if (Receiver->getType() == Context.UnknownAnyTy) in BuildInstanceMessage()
2876 Result = forceUnknownAnyToType(Receiver, Context.getObjCIdType()); in BuildInstanceMessage()
2890 Context, Context.DependentTy, VK_PRValue, LBracLoc, Receiver, Sel, in BuildInstanceMessage()
2909 !Context.getObjCIdType().isNull() && in BuildInstanceMessage()
2916 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(), in BuildInstanceMessage()
2920 bool IsNull = Receiver->isNullPointerConstant(Context, in BuildInstanceMessage()
2923 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(), in BuildInstanceMessage()
2949 bool receiverIsIdLike = ReceiverType->isObjCIdOrObjectKindOfType(Context, in BuildInstanceMessage()
2952 (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) { in BuildInstanceMessage()
3329 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildInstanceMessage()
3335 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildInstanceMessage()
3354 Context.getObjCInterfaceType(CurMeth->getClassInterface()); in BuildInstanceMessage()
3434 IdentifierInfo *SelectorId = &Context.Idents.get("respondsToSelector"); in ActOnInstanceMessage()
3435 RespondsToSelectorSel = Context.Selectors.getUnarySelector(SelectorId); in ActOnInstanceMessage()
3541 ASTContext &Context; member in __anonb843a6260411::ARCCastChecker
3552 ARCCastChecker(ASTContext &Context, ARCConversionTypeClass source, in ARCCastChecker() argument
3554 : Context(Context), SourceClass(source), TargetClass(target), in ARCCastChecker()
3568 if (e->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull)) in VisitExpr()
3636 !var->hasDefinition(Context) && in VisitDeclRefExpr()
3641 if (Context.getSourceManager().isInSystemHeader(var->getLocation())) in VisitDeclRefExpr()
3745 LookupResult R(*this, &Context.Idents.get(name), SourceLocation(), in isKnownName()
3930 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
3971 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
4038 (S.Context.ObjCObjectAdoptsQTypeProtocols( in CheckObjCBridgeNSCast()
4107 (S.Context.QIdProtocolsAdoptObjCObjectProtocols( in CheckObjCBridgeCFCast()
4273 Selector Sel = Context.Selectors.getUnarySelector(CMId); in checkObjCBridgeRelatedComponents()
4287 Selector Sel = Context.Selectors.getNullarySelector(IMId); in checkObjCBridgeRelatedComponents()
4340 QualType receiverType = Context.getObjCInterfaceType(RelatedClass); in CheckObjCBridgeRelatedConversions()
4450 if (castACTC == ACTC_none && castType->isIntegralType(Context)) in CheckObjCConversion()
4462 switch (ARCCastChecker(Context, exprACTC, castACTC, false).Visit(castExpr)) { in CheckObjCConversion()
4474 castExpr = ImplicitCastExpr::Create(Context, castExpr->getType(), in CheckObjCConversion()
4550 return new (Context) ParenExpr(pe->getLParen(), pe->getRParen(), sub); in stripARCUnbridgedCast()
4554 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()