Lines Matching refs:Context

70     S = StringLiteral::Create(Context, StrBuf,  in ParseObjCStringLiteral()
72 Context.getPointerType(Context.CharTy), in ParseObjCStringLiteral()
88 QualType Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
90 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
96 NSIdent = &Context.Idents.get("NSConstantString"); in BuildObjCStringLiteral()
98 NSIdent = &Context.Idents.get(StringClass); in BuildObjCStringLiteral()
103 Context.setObjCConstantStringInterface(StrIF); in BuildObjCStringLiteral()
104 Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
105 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
111 Ty = Context.getObjCIdType(); in BuildObjCStringLiteral()
118 Context.setObjCConstantStringInterface(StrIF); in BuildObjCStringLiteral()
119 Ty = Context.getObjCConstantStringInterface(); in BuildObjCStringLiteral()
120 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
126 Ty = Context.getObjCNSStringType(); in BuildObjCStringLiteral()
129 ObjCInterfaceDecl::Create (Context, in BuildObjCStringLiteral()
130 Context.getTranslationUnitDecl(), in BuildObjCStringLiteral()
133 Ty = Context.getObjCInterfaceType(NSStringIDecl); in BuildObjCStringLiteral()
134 Context.setObjCNSStringType(Ty); in BuildObjCStringLiteral()
136 Ty = Context.getObjCObjectPointerType(Ty); in BuildObjCStringLiteral()
140 return new (Context) ObjCStringLiteral(S, Ty, AtLoc); in BuildObjCStringLiteral()
191 ASTContext &CX = S.Context; in getNSNumberFactoryMethod()
237 ParmVarDecl *value = ParmVarDecl::Create(S.Context, Method, in getNSNumberFactoryMethod()
242 Method->setMethodParams(S.Context, value, None); in getNSNumberFactoryMethod()
265 NumberType = Context.CharTy; in BuildObjCNumericLiteral()
269 NumberType = Context.getWideCharType(); in BuildObjCNumericLiteral()
273 NumberType = Context.Char16Ty; in BuildObjCNumericLiteral()
277 NumberType = Context.Char32Ty; in BuildObjCNumericLiteral()
292 InitializedEntity Entity = InitializedEntity::InitializeParameter(Context, in BuildObjCNumericLiteral()
303 new (Context) ObjCBoxedExpr(Number, NSNumberPointer, Method, in BuildObjCNumericLiteral()
317 Inner = ImpCastExprToType(Inner.get(), Context.BoolTy, in ActOnObjCBoolLiteral()
342 = InitializedEntity::InitializeParameter(S.Context, T, in CheckObjCCollectionLiteralElement()
436 InitializedEntity::InitializeParameter(S.Context, T, in CheckObjCCollectionLiteralElement()
444 new (Context) ObjCBoxedExpr(ValueExpr, Context.DependentTy, NULL, SR); in BuildObjCBoxedExpr()
458 if (Context.hasSameUnqualifiedType(PointeeType, Context.CharTy)) { in BuildObjCBoxedExpr()
469 DeclContext *TU = Context.getTranslationUnitDecl(); in BuildObjCBoxedExpr()
470 NSStringDecl = ObjCInterfaceDecl::Create(Context, TU, in BuildObjCBoxedExpr()
483 QualType NSStringObject = Context.getObjCInterfaceType(NSStringDecl); in BuildObjCBoxedExpr()
484 NSStringPointer = Context.getObjCObjectPointerType(NSStringObject); in BuildObjCBoxedExpr()
488 IdentifierInfo *II = &Context.Idents.get("stringWithUTF8String"); in BuildObjCBoxedExpr()
489 Selector stringWithUTF8String = Context.Selectors.getUnarySelector(II); in BuildObjCBoxedExpr()
497 ObjCMethodDecl::Create(Context, SourceLocation(), SourceLocation(), in BuildObjCBoxedExpr()
506 QualType ConstCharType = Context.CharTy.withConst(); in BuildObjCBoxedExpr()
508 ParmVarDecl::Create(Context, M, in BuildObjCBoxedExpr()
510 &Context.Idents.get("value"), in BuildObjCBoxedExpr()
511 Context.getPointerType(ConstCharType), in BuildObjCBoxedExpr()
514 M->setMethodParams(Context, value, None); in BuildObjCBoxedExpr()
541 ValueType = Context.CharTy; in BuildObjCBoxedExpr()
545 ValueType = Context.getWideCharType(); in BuildObjCBoxedExpr()
549 ValueType = Context.Char16Ty; in BuildObjCBoxedExpr()
553 ValueType = Context.Char32Ty; in BuildObjCBoxedExpr()
584 InitializedEntity Entity = InitializedEntity::InitializeParameter(Context, in BuildObjCBoxedExpr()
594 new (Context) ObjCBoxedExpr(ValueExpr, BoxedType, in BuildObjCBoxedExpr()
626 return Owned(ObjCSubscriptRefExpr::Create(Context, in BuildObjCSubscriptExpression()
629 Context.PseudoObjectTy, in BuildObjCSubscriptExpression()
644 NSArrayDecl = ObjCInterfaceDecl::Create (Context, in BuildObjCArrayLiteral()
645 Context.getTranslationUnitDecl(), in BuildObjCArrayLiteral()
657 QualType IdT = Context.getObjCIdType(); in BuildObjCArrayLiteral()
664 Method = ObjCMethodDecl::Create(Context, in BuildObjCArrayLiteral()
668 Context.getTranslationUnitDecl(), in BuildObjCArrayLiteral()
675 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
678 &Context.Idents.get("objects"), in BuildObjCArrayLiteral()
679 Context.getPointerType(IdT), in BuildObjCArrayLiteral()
682 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
685 &Context.Idents.get("cnt"), in BuildObjCArrayLiteral()
686 Context.UnsignedLongTy, in BuildObjCArrayLiteral()
689 Method->setMethodParams(Context, Params, None); in BuildObjCArrayLiteral()
699 !Context.hasSameUnqualifiedType(PtrT->getPointeeType(), IdT)) { in BuildObjCArrayLiteral()
705 << Context.getPointerType(IdT.withConst()); in BuildObjCArrayLiteral()
742 = Context.getObjCObjectPointerType( in BuildObjCArrayLiteral()
743 Context.getObjCInterfaceType(NSArrayDecl)); in BuildObjCArrayLiteral()
746 ObjCArrayLiteral::Create(Context, Elements, Ty, in BuildObjCArrayLiteral()
760 NSDictionaryDecl = ObjCInterfaceDecl::Create (Context, in BuildObjCDictionaryLiteral()
761 Context.getTranslationUnitDecl(), in BuildObjCDictionaryLiteral()
774 QualType IdT = Context.getObjCIdType(); in BuildObjCDictionaryLiteral()
780 Method = ObjCMethodDecl::Create(Context, in BuildObjCDictionaryLiteral()
784 Context.getTranslationUnitDecl(), in BuildObjCDictionaryLiteral()
791 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
794 &Context.Idents.get("objects"), in BuildObjCDictionaryLiteral()
795 Context.getPointerType(IdT), in BuildObjCDictionaryLiteral()
798 ParmVarDecl *keys = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
801 &Context.Idents.get("keys"), in BuildObjCDictionaryLiteral()
802 Context.getPointerType(IdT), in BuildObjCDictionaryLiteral()
805 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
808 &Context.Idents.get("cnt"), in BuildObjCDictionaryLiteral()
809 Context.UnsignedLongTy, in BuildObjCDictionaryLiteral()
812 Method->setMethodParams(Context, Params, None); in BuildObjCDictionaryLiteral()
823 !Context.hasSameUnqualifiedType(PtrValue->getPointeeType(), IdT)) { in BuildObjCDictionaryLiteral()
829 << Context.getPointerType(IdT.withConst()); in BuildObjCDictionaryLiteral()
837 !Context.hasSameUnqualifiedType(PtrKey->getPointeeType(), in BuildObjCDictionaryLiteral()
844 LookupProtocol(&Context.Idents.get("NSCopying"), SR.getBegin())) { in BuildObjCDictionaryLiteral()
847 Context.getObjCObjectType(Context.ObjCBuiltinIdTy, in BuildObjCDictionaryLiteral()
849 QIDNSCopying = Context.getObjCObjectPointerType(QIDNSCopying); in BuildObjCDictionaryLiteral()
853 err = !Context.hasSameUnqualifiedType(PtrKey->getPointeeType(), in BuildObjCDictionaryLiteral()
863 << Context.getPointerType(IdT.withConst()); in BuildObjCDictionaryLiteral()
925 = Context.getObjCObjectPointerType( in BuildObjCDictionaryLiteral()
926 Context.getObjCInterfaceType(NSDictionaryDecl)); in BuildObjCDictionaryLiteral()
928 Context, makeArrayRef(Elements, NumElements), HasPackExpansions, Ty, in BuildObjCDictionaryLiteral()
938 StrTy = Context.DependentTy; in BuildObjCEncodeExpression()
948 Context.getObjCEncodingForType(EncodedType, Str); in BuildObjCEncodeExpression()
952 StrTy = Context.CharTy; in BuildObjCEncodeExpression()
956 StrTy = Context.getConstantArrayType(StrTy, llvm::APInt(32, Str.size()+1), in BuildObjCEncodeExpression()
960 return new (Context) ObjCEncodeExpr(StrTy, EncodedTypeInfo, AtLoc, RParenLoc); in BuildObjCEncodeExpression()
972 TInfo = Context.getTrivialTypeSourceInfo(EncodedType, in ParseObjCEncodeExpression()
1034 QualType Ty = Context.getObjCSelType(); in ParseObjCSelectorExpression()
1035 return new (Context) ObjCSelectorExpr(Ty, Sel, AtLoc, RParenLoc); in ParseObjCSelectorExpression()
1050 QualType Ty = Context.getObjCProtoType(); in ParseObjCProtocolExpression()
1053 Ty = Context.getObjCObjectPointerType(Ty); in ParseObjCProtocolExpression()
1054 return new (Context) ObjCProtocolExpr(Ty, PDecl, AtLoc, ProtoIdLoc, RParenLoc); in ParseObjCProtocolExpression()
1073 static QualType stripObjCInstanceType(ASTContext &Context, QualType T) { in stripObjCInstanceType() argument
1074 if (T == Context.getObjCInstanceType()) in stripObjCInstanceType()
1075 return Context.getObjCIdType(); in stripObjCInstanceType()
1092 return stripObjCInstanceType(Context, Method->getSendResultType()); in getMessageSendResultType()
1099 return Context.getObjCObjectPointerType( in getMessageSendResultType()
1100 Context.getObjCInterfaceType(Class)); in getMessageSendResultType()
1106 return Context.getObjCObjectPointerType(ReceiverType); in getMessageSendResultType()
1111 return stripObjCInstanceType(Context, Method->getSendResultType()); in getMessageSendResultType()
1158 Context.hasSameUnqualifiedType(destType, MD->getResultType())) in EmitRelatedResultTypeNoteForReturn()
1164 findExplicitInstancetypeDeclarer(MD, Context.getObjCInstanceType())) { in EmitRelatedResultTypeNoteForReturn()
1199 if (Context.hasSameUnqualifiedType(Method->getResultType() in EmitRelatedResultTypeNote()
1204 if (!Context.hasSameUnqualifiedType(Method->getResultType(), in EmitRelatedResultTypeNote()
1205 Context.getObjCInstanceType())) in EmitRelatedResultTypeNote()
1280 ReturnType = Context.UnknownAnyTy; in CheckMessageArgumentTypes()
1282 ReturnType = Context.getObjCIdType(); in CheckMessageArgumentTypes()
1323 if (param->getType() == Context.UnknownAnyTy) { in CheckMessageArgumentTypes()
1342 InitializedEntity Entity = InitializedEntity::InitializeParameter(Context, in CheckMessageArgumentTypes()
1528 return Owned(new (Context) ObjCPropertyRefExpr(PD, Context.PseudoObjectTy, in HandleExprPropertyRefExpr()
1533 return Owned(new (Context) ObjCPropertyRefExpr(PD, Context.PseudoObjectTy, in HandleExprPropertyRefExpr()
1546 return Owned(new (Context) ObjCPropertyRefExpr(PD, in HandleExprPropertyRefExpr()
1547 Context.PseudoObjectTy, in HandleExprPropertyRefExpr()
1553 return Owned(new (Context) ObjCPropertyRefExpr(PD, in HandleExprPropertyRefExpr()
1554 Context.PseudoObjectTy, in HandleExprPropertyRefExpr()
1604 return Owned(new (Context) ObjCPropertyRefExpr(Getter, Setter, in HandleExprPropertyRefExpr()
1605 Context.PseudoObjectTy, in HandleExprPropertyRefExpr()
1610 return Owned(new (Context) ObjCPropertyRefExpr(Getter, Setter, in HandleExprPropertyRefExpr()
1611 Context.PseudoObjectTy, in HandleExprPropertyRefExpr()
1684 QualType T = Context.getObjCInterfaceType(Super); in ActOnClassPropertyRefExpr()
1685 T = Context.getObjCObjectPointerType(T); in ActOnClassPropertyRefExpr()
1749 return Owned(new (Context) ObjCPropertyRefExpr(Getter, Setter, in ActOnClassPropertyRefExpr()
1750 Context.PseudoObjectTy, in ActOnClassPropertyRefExpr()
1754 Context.getObjCInterfaceType(IFace))); in ActOnClassPropertyRefExpr()
1756 return Owned(new (Context) ObjCPropertyRefExpr(Getter, Setter, in ActOnClassPropertyRefExpr()
1757 Context.PseudoObjectTy, in ActOnClassPropertyRefExpr()
1763 << &propertyName << Context.getObjCInterfaceType(IFace)); in ActOnClassPropertyRefExpr()
1839 T = Context.getObjCInterfaceType(Class); in getObjCMessageKind()
1841 T = Context.getTypeDeclType(Type); in getObjCMessageKind()
1849 TypeSourceInfo *TSInfo = Context.getTrivialTypeSourceInfo(T, NameLoc); in getObjCMessageKind()
1871 QualType T = Context.getObjCInterfaceType(Class); in getObjCMessageKind()
1872 TypeSourceInfo *TSInfo = Context.getTrivialTypeSourceInfo(T, NameLoc); in getObjCMessageKind()
1919 QualType SuperTy = Context.getObjCInterfaceType(Super); in ActOnSuperMessage()
1920 SuperTy = Context.getObjCObjectPointerType(SuperTy); in ActOnSuperMessage()
1929 Context.getObjCInterfaceType(Super), in ActOnSuperMessage()
1943 receiverTypeInfo = Context.getTrivialTypeSourceInfo(ReceiverType); in BuildClassMessageImplicit()
2053 return Owned(ObjCMessageExpr::Create(Context, ReceiverType, in BuildClassMessage()
2077 if (RequireCompleteType(Loc, Context.getObjCInterfaceType(Class), in BuildClassMessage()
2121 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildClassMessage()
2127 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildClassMessage()
2154 ReceiverTypeInfo = Context.getTrivialTypeSourceInfo(ReceiverType, LBracLoc); in ActOnClassMessage()
2232 if (Receiver->getType() == Context.UnknownAnyTy) in BuildInstanceMessage()
2233 Result = forceUnknownAnyToType(Receiver, Context.getObjCIdType()); in BuildInstanceMessage()
2246 return Owned(ObjCMessageExpr::Create(Context, Context.DependentTy, in BuildInstanceMessage()
2267 !Context.getObjCIdType().isNull() && in BuildInstanceMessage()
2276 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(), in BuildInstanceMessage()
2280 bool IsNull = Receiver->isNullPointerConstant(Context, in BuildInstanceMessage()
2283 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(), in BuildInstanceMessage()
2309 (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) { in BuildInstanceMessage()
2550 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildInstanceMessage()
2556 Result = ObjCMessageExpr::Create(Context, ReturnType, VK, LBracLoc, in BuildInstanceMessage()
2640 IdentifierInfo *SelectorId = &Context.Idents.get("respondsToSelector"); in ActOnInstanceMessage()
2641 RespondsToSelectorSel = Context.Selectors.getUnarySelector(SelectorId); in ActOnInstanceMessage()
2744 ASTContext &Context; member in __anon6c95a5750211::ARCCastChecker
2755 ARCCastChecker(ASTContext &Context, ARCConversionTypeClass source, in ARCCastChecker() argument
2757 : Context(Context), SourceClass(source), TargetClass(target), in ARCCastChecker()
2771 if (e->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull)) in VisitExpr()
2843 Context.getSourceManager().isInSystemHeader(var->getLocation())) { in VisitDeclRefExpr()
2945 LookupResult R(*this, &Context.Idents.get(name), SourceLocation(), in isKnownName()
3095 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
3135 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
3316 if (castACTC == ACTC_none && castType->isIntegralType(Context)) in CheckObjCARCConversion()
3339 switch (ARCCastChecker(Context, exprACTC, castACTC, false).Visit(castExpr)) { in CheckObjCARCConversion()
3351 castExpr = ImplicitCastExpr::Create(Context, castExpr->getType(), in CheckObjCARCConversion()
3417 return new (Context) ParenExpr(pe->getLParen(), pe->getRParen(), sub); in stripARCUnbridgedCast()
3421 return new (Context) UnaryOperator(sub, UO_Extension, sub->getType(), in stripARCUnbridgedCast()
3438 return new (Context) GenericSelectionExpr(Context, gse->getGenericLoc(), in stripARCUnbridgedCast()
3454 Context.getCanonicalType(castType).getUnqualifiedType(); in CheckObjCARCUnavailableWeakConversion()
3456 Context.getCanonicalType(exprType).getUnqualifiedType(); in CheckObjCARCUnavailableWeakConversion()
3546 SubExpr = ImplicitCastExpr::Create(Context, FromType, in BuildObjCBridgedCast()
3580 Expr *Result = new (Context) ObjCBridgedCastExpr(LParenLoc, Kind, CK, in BuildObjCBridgedCast()
3586 Result = ImplicitCastExpr::Create(Context, T, CK_ARCConsumeObject, Result, in BuildObjCBridgedCast()
3603 TSInfo = Context.getTrivialTypeSourceInfo(T, LParenLoc); in ActOnObjCBridgedCast()