Lines Matching refs:Context

66     ASTContext *Context;  member in __anone4fa00500111::RewriteObjC
218 Diags.Report(Context->getFullLoc(Old->getBeginLoc()), RewriteFailedDiag) in ReplaceStmtWithRange()
235 Diags.Report(Context->getFullLoc(Old->getBeginLoc()), RewriteFailedDiag) in ReplaceStmtWithRange()
246 Diags.Report(Context->getFullLoc(Loc), RewriteFailedDiag); in InsertText()
256 Diags.Report(Context->getFullLoc(Start), RewriteFailedDiag); in ReplaceText()
420 T = Context->getPointerType(BPT->getPointeeType()); in convertBlockPointerToFunctionPointer()
434 T = Context->getObjCIdType(); in convertToUnqualifiedObjCType()
436 T = Context->getObjCClassType(); in convertToUnqualifiedObjCType()
443 T = Context->getPointerType(T); in convertToUnqualifiedObjCType()
453 QualType OCT = Context->getCanonicalType(T).getUnqualifiedType(); in isObjCType()
455 if (OCT == Context->getCanonicalType(Context->getObjCIdType()) || in isObjCType()
456 OCT == Context->getCanonicalType(Context->getObjCClassType())) in isObjCType()
483 if (result == Context->getObjCInstanceType()) in getSimpleFunctionType()
484 result = Context->getObjCIdType(); in getSimpleFunctionType()
487 return Context->getFunctionType(result, args, fpi); in getSimpleFunctionType()
500 QualType StrType = Context->getConstantArrayType( in getStringLiteral()
501 Context->CharTy, llvm::APInt(32, Str.size() + 1), nullptr, in getStringLiteral()
503 return StringLiteral::Create(*Context, Str, StringLiteralKind::Ordinary, in getStringLiteral()
602 Context = &context; in InitializeCommon()
603 SM = &Context->getSourceManager(); in InitializeCommon()
604 TUDecl = Context->getTranslationUnitDecl(); in InitializeCommon()
638 Rewrite.setSourceMgr(Context->getSourceManager(), Context->getLangOpts()); in InitializeCommon()
825 FT->getParamType(i).getAsString(Context->getPrintingPolicy()); in RewritePropertyImplDecl()
1056 FPRetType->getReturnType().getAsString(Context->getPrintingPolicy()); in RewriteTypeIntoString()
1060 ResultStr += T.getAsString(Context->getPrintingPolicy()); in RewriteTypeIntoString()
1106 QualType selfTy = Context->getObjCInterfaceType(IDecl); in RewriteObjCMethodDecl()
1107 selfTy = Context->getPointerType(selfTy); in RewriteObjCMethodDecl()
1117 ResultStr += Context->getObjCClassType().getAsString( in RewriteObjCMethodDecl()
1118 Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1121 ResultStr += Context->getObjCSelType().getAsString(Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1135 QT.getAsStringInternal(Name, Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1152 FT->getParamType(i).getAsString(Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1271 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitSetter()
1284 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitSetter()
1298 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitSetter()
1347 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitGetter()
1360 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitGetter()
1374 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitGetter()
1503 elementTypeAsString = ElementType.getAsString(Context->getPrintingPolicy()); in RewriteObjCForCollectionStmt()
1519 elementTypeAsString = VD->getType().getAsString(Context->getPrintingPolicy()); in RewriteObjCForCollectionStmt()
1698 syncExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in RewriteObjCSynchronizedStmt()
1730 Diags.Report(Context->getFullLoc(S->getBeginLoc()), in WarnAboutReturnGotoStmts()
1860 if (t == Context->getObjCIdType()) { in RewriteObjCTryStmt()
1988 Context->getObjCEncodingForType(Exp->getEncodedType(), StrEncoding); in RewriteAtEncode()
2020 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl()
2024 QualType pToFunc = Context->getPointerType(msgSendType); in SynthesizeCallToFunctionDecl()
2026 ImplicitCastExpr::Create(*Context, pToFunc, CK_FunctionToPointerDecay, in SynthesizeCallToFunctionDecl()
2032 CallExpr::Create(*Context, ICE, Args, FT->getCallResultType(*Context), in SynthesizeCallToFunctionDecl()
2078 QualType ElemTy = Context->getBaseElementType(T); in needToScanForQualifiers()
2204 std::string TypeAsString(QT.getAsString(Context->getPrintingPolicy())); in RewriteTypeOfDecl()
2230 IdentifierInfo *SelGetUidIdent = &Context->Idents.get("sel_registerName"); in SynthSelGetUidFunctionDecl()
2232 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst())); in SynthSelGetUidFunctionDecl()
2234 getSimpleFunctionType(Context->getObjCSelType(), ArgTys); in SynthSelGetUidFunctionDecl()
2235 SelGetUidFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthSelGetUidFunctionDecl()
2253 std::string TypeString(Type.getAsString(Context->getPrintingPolicy())); in RewriteBlockPointerType()
2269 std::string TypeString(Type.getAsString(Context->getPrintingPolicy())); in RewriteBlockPointerTypeVariable()
2302 std::string FdStr = Type.getAsString(Context->getPrintingPolicy()); in RewriteBlockLiteralFunctionDecl()
2322 IdentifierInfo *msgSendIdent = &Context->Idents.get("__rw_objc_super"); in SynthSuperConstructorFunctionDecl()
2324 QualType argT = Context->getObjCIdType(); in SynthSuperConstructorFunctionDecl()
2328 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthSuperConstructorFunctionDecl()
2330 SuperConstructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthSuperConstructorFunctionDecl()
2339 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend"); in SynthMsgSendFunctionDecl()
2341 QualType argT = Context->getObjCIdType(); in SynthMsgSendFunctionDecl()
2344 argT = Context->getObjCSelType(); in SynthMsgSendFunctionDecl()
2347 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendFunctionDecl()
2349 MsgSendFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendFunctionDecl()
2358 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSendSuper"); in SynthMsgSendSuperFunctionDecl()
2360 RecordDecl *RD = RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in SynthMsgSendSuperFunctionDecl()
2362 &Context->Idents.get("objc_super")); in SynthMsgSendSuperFunctionDecl()
2363 QualType argT = Context->getPointerType(Context->getTagDeclType(RD)); in SynthMsgSendSuperFunctionDecl()
2366 argT = Context->getObjCSelType(); in SynthMsgSendSuperFunctionDecl()
2369 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendSuperFunctionDecl()
2371 MsgSendSuperFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendSuperFunctionDecl()
2380 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend_stret"); in SynthMsgSendStretFunctionDecl()
2382 QualType argT = Context->getObjCIdType(); in SynthMsgSendStretFunctionDecl()
2385 argT = Context->getObjCSelType(); in SynthMsgSendStretFunctionDecl()
2388 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendStretFunctionDecl()
2390 MsgSendStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendStretFunctionDecl()
2401 &Context->Idents.get("objc_msgSendSuper_stret"); in SynthMsgSendSuperStretFunctionDecl()
2403 RecordDecl *RD = RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in SynthMsgSendSuperStretFunctionDecl()
2405 &Context->Idents.get("objc_super")); in SynthMsgSendSuperStretFunctionDecl()
2406 QualType argT = Context->getPointerType(Context->getTagDeclType(RD)); in SynthMsgSendSuperStretFunctionDecl()
2409 argT = Context->getObjCSelType(); in SynthMsgSendSuperStretFunctionDecl()
2412 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendSuperStretFunctionDecl()
2414 MsgSendSuperStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendSuperStretFunctionDecl()
2424 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend_fpret"); in SynthMsgSendFpretFunctionDecl()
2426 QualType argT = Context->getObjCIdType(); in SynthMsgSendFpretFunctionDecl()
2429 argT = Context->getObjCSelType(); in SynthMsgSendFpretFunctionDecl()
2432 QualType msgSendType = getSimpleFunctionType(Context->DoubleTy, in SynthMsgSendFpretFunctionDecl()
2434 MsgSendFpretFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendFpretFunctionDecl()
2443 IdentifierInfo *getClassIdent = &Context->Idents.get("objc_getClass"); in SynthGetClassFunctionDecl()
2445 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst())); in SynthGetClassFunctionDecl()
2446 QualType getClassType = getSimpleFunctionType(Context->getObjCIdType(), in SynthGetClassFunctionDecl()
2448 GetClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthGetClassFunctionDecl()
2458 &Context->Idents.get("class_getSuperclass"); in SynthGetSuperClassFunctionDecl()
2460 ArgTys.push_back(Context->getObjCClassType()); in SynthGetSuperClassFunctionDecl()
2461 QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(), in SynthGetSuperClassFunctionDecl()
2463 GetSuperClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthGetSuperClassFunctionDecl()
2473 IdentifierInfo *getClassIdent = &Context->Idents.get("objc_getMetaClass"); in SynthGetMetaClassFunctionDecl()
2475 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst())); in SynthGetMetaClassFunctionDecl()
2476 QualType getClassType = getSimpleFunctionType(Context->getObjCIdType(), in SynthGetMetaClassFunctionDecl()
2478 GetMetaClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthGetMetaClassFunctionDecl()
2514 VarDecl *NewVD = VarDecl::Create(*Context, TUDecl, SourceLocation(), in RewriteObjCStringLiteral()
2515 SourceLocation(), &Context->Idents.get(S), in RewriteObjCStringLiteral()
2517 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral()
2518 DeclRefExpr(*Context, NewVD, false, strType, VK_LValue, SourceLocation()); in RewriteObjCStringLiteral()
2520 const_cast<ASTContext &>(*Context), DRE, UO_AddrOf, in RewriteObjCStringLiteral()
2521 Context->getPointerType(DRE->getType()), VK_PRValue, OK_Ordinary, in RewriteObjCStringLiteral()
2524 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, Exp->getType(), in RewriteObjCStringLiteral()
2534 SuperStructDecl = RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in getSuperStructType()
2536 &Context->Idents.get("objc_super")); in getSuperStructType()
2540 FieldTypes[0] = Context->getObjCIdType(); in getSuperStructType()
2542 FieldTypes[1] = Context->getObjCClassType(); in getSuperStructType()
2546 SuperStructDecl->addDecl(FieldDecl::Create(*Context, SuperStructDecl, in getSuperStructType()
2557 return Context->getTagDeclType(SuperStructDecl); in getSuperStructType()
2563 *Context, TagTypeKind::Struct, TUDecl, SourceLocation(), in getConstantStringStructType()
2564 SourceLocation(), &Context->Idents.get("__NSConstantStringImpl")); in getConstantStringStructType()
2568 FieldTypes[0] = Context->getObjCIdType(); in getConstantStringStructType()
2570 FieldTypes[1] = Context->IntTy; in getConstantStringStructType()
2572 FieldTypes[2] = Context->getPointerType(Context->CharTy); in getConstantStringStructType()
2574 FieldTypes[3] = Context->LongTy; in getConstantStringStructType()
2578 ConstantStringDecl->addDecl(FieldDecl::Create(*Context, in getConstantStringStructType()
2590 return Context->getTagDeclType(ConstantStringDecl); in getConstantStringStructType()
2601 new (Context) DeclRefExpr(*Context, MsgSendStretFlavor, false, in SynthMsgSendStretCallExpr()
2604 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, in SynthMsgSendStretCallExpr()
2605 Context->getPointerType(Context->VoidTy), in SynthMsgSendStretCallExpr()
2611 castType = Context->getPointerType(castType); in SynthMsgSendStretCallExpr()
2612 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast, in SynthMsgSendStretCallExpr()
2616 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), cast); in SynthMsgSendStretCallExpr()
2620 CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(), VK_PRValue, in SynthMsgSendStretCallExpr()
2674 Context, Context->getObjCIdType(), CK_BitCast, in SynthMessageExpr()
2675 new (Context) DeclRefExpr(*Context, CurMethodDef->getSelfDecl(), false, in SynthMessageExpr()
2676 Context->getObjCIdType(), VK_PRValue, in SynthMessageExpr()
2685 CastExpr *ArgExpr = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2686 Context->getObjCClassType(), in SynthMessageExpr()
2695 NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2696 Context->getObjCIdType(), in SynthMessageExpr()
2705 DeclRefExpr *DRE = new (Context) in SynthMessageExpr()
2706 DeclRefExpr(*Context, SuperConstructorFunctionDecl, false, superType, in SynthMessageExpr()
2709 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr()
2718 const_cast<ASTContext &>(*Context), SuperRep, UO_AddrOf, in SynthMessageExpr()
2719 Context->getPointerType(SuperRep->getType()), VK_PRValue, OK_Ordinary, in SynthMessageExpr()
2721 SuperRep = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2722 Context->getPointerType(superType), in SynthMessageExpr()
2727 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs, in SynthMessageExpr()
2730 = Context->getTrivialTypeSourceInfo(superType); in SynthMessageExpr()
2731 SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), superTInfo, in SynthMessageExpr()
2736 const_cast<ASTContext &>(*Context), SuperRep, UO_AddrOf, in SynthMessageExpr()
2737 Context->getPointerType(SuperRep->getType()), VK_PRValue, OK_Ordinary, in SynthMessageExpr()
2765 Context, Context->getObjCIdType(), CK_BitCast, in SynthMessageExpr()
2766 new (Context) DeclRefExpr(*Context, CurMethodDef->getSelfDecl(), false, in SynthMessageExpr()
2767 Context->getObjCIdType(), VK_PRValue, in SynthMessageExpr()
2776 CastExpr *ArgExpr = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2777 Context->getObjCClassType(), in SynthMessageExpr()
2788 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
2797 DeclRefExpr *DRE = new (Context) in SynthMessageExpr()
2798 DeclRefExpr(*Context, SuperConstructorFunctionDecl, false, superType, in SynthMessageExpr()
2801 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr()
2810 const_cast<ASTContext &>(*Context), SuperRep, UO_AddrOf, in SynthMessageExpr()
2811 Context->getPointerType(SuperRep->getType()), VK_PRValue, OK_Ordinary, in SynthMessageExpr()
2813 SuperRep = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2814 Context->getPointerType(superType), in SynthMessageExpr()
2819 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs, in SynthMessageExpr()
2822 = Context->getTrivialTypeSourceInfo(superType); in SynthMessageExpr()
2823 SuperRep = new (Context) CompoundLiteralExpr( in SynthMessageExpr()
2841 recExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
2863 type = Context->getObjCIdType(); in SynthMessageExpr()
2868 if (SubExpr->getType()->isIntegralType(*Context) && in SynthMessageExpr()
2883 userExpr = NoTypeInfoCStyleCastExpr(Context, type, CK, userExpr); in SynthMessageExpr()
2891 if (userExpr->getType()->isIntegralType(*Context)) { in SynthMessageExpr()
2900 userExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
2917 ArgTypes.push_back(Context->getPointerType(getSuperStructType())); in SynthMessageExpr()
2919 ArgTypes.push_back(Context->getObjCIdType()); in SynthMessageExpr()
2920 ArgTypes.push_back(Context->getObjCSelType()); in SynthMessageExpr()
2925 ? Context->getObjCIdType() in SynthMessageExpr()
2935 returnType = Context->getObjCIdType(); in SynthMessageExpr()
2941 DeclRefExpr *DRE = new (Context) DeclRefExpr( in SynthMessageExpr()
2942 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation()); in SynthMessageExpr()
2948 cast = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2949 Context->getPointerType(Context->VoidTy), in SynthMessageExpr()
2957 castType = Context->getPointerType(castType); in SynthMessageExpr()
2958 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast, in SynthMessageExpr()
2962 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast); in SynthMessageExpr()
2965 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(), in SynthMessageExpr()
2981 new (Context) UnaryExprOrTypeTraitExpr(UETT_SizeOf, in SynthMessageExpr()
2982 Context->getTrivialTypeSourceInfo(returnType), in SynthMessageExpr()
2983 Context->getSizeType(), SourceLocation(), in SynthMessageExpr()
2990 static_cast<unsigned>(Context->getTypeSize(Context->IntTy)); in SynthMessageExpr()
2991 IntegerLiteral *limit = IntegerLiteral::Create(*Context, in SynthMessageExpr()
2993 Context->IntTy, in SynthMessageExpr()
2996 *Context, sizeofExpr, limit, BO_LE, Context->IntTy, VK_PRValue, in SynthMessageExpr()
2999 ConditionalOperator *CondExpr = new (Context) ConditionalOperator( in SynthMessageExpr()
3002 ReplacingStmt = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in SynthMessageExpr()
3024 = Context->getTrivialTypeSourceInfo(Context->getObjCIdType()); in getProtocolType()
3025 ProtocolTypeDecl = TypedefDecl::Create(*Context, TUDecl, in getProtocolType()
3027 &Context->Idents.get("Protocol"), in getProtocolType()
3030 return Context->getTypeDeclType(ProtocolTypeDecl); in getProtocolType()
3039 IdentifierInfo *ID = &Context->Idents.get(Name); in RewriteObjCProtocolExpr()
3040 VarDecl *VD = VarDecl::Create(*Context, TUDecl, SourceLocation(), in RewriteObjCProtocolExpr()
3043 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCProtocolExpr()
3044 *Context, VD, false, getProtocolType(), VK_LValue, SourceLocation()); in RewriteObjCProtocolExpr()
3046 const_cast<ASTContext &>(*Context), DRE, UO_AddrOf, in RewriteObjCProtocolExpr()
3047 Context->getPointerType(DRE->getType()), VK_PRValue, OK_Ordinary, in RewriteObjCProtocolExpr()
3049 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, DerefExpr->getType(), in RewriteObjCProtocolExpr()
3258 std::string S = "static " + RT.getAsString(Context->getPrintingPolicy()) + " __" + in SynthesizeBlockFunc()
3282 QT.getAsStringInternal(ParamStr, Context->getPrintingPolicy()); in SynthesizeBlockFunc()
3330 QT = Context->getPointerType(QT); in SynthesizeBlockFunc()
3331 QT.getAsStringInternal(Name, Context->getPrintingPolicy()); in SynthesizeBlockFunc()
3424 QT = Context->getPointerType(QT); in SynthesizeBlockImpl()
3425 QT.getAsStringInternal(FieldName, Context->getPrintingPolicy()); in SynthesizeBlockImpl()
3426 QT.getAsStringInternal(ArgName, Context->getPrintingPolicy()); in SynthesizeBlockImpl()
3740 ConditionalOperator *CondExpr = new (Context) ConditionalOperator( in SynthesizeBlockCall()
3758 RecordDecl *RD = RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in SynthesizeBlockCall()
3760 &Context->Idents.get("__block_impl")); in SynthesizeBlockCall()
3761 QualType PtrBlock = Context->getPointerType(Context->getTagDeclType(RD)); in SynthesizeBlockCall()
3780 PtrToFuncCastType = Context->getPointerType(PtrToFuncCastType); in SynthesizeBlockCall()
3782 CastExpr *BlkCast = NoTypeInfoCStyleCastExpr(Context, PtrBlock, in SynthesizeBlockCall()
3786 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in SynthesizeBlockCall()
3790 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in SynthesizeBlockCall()
3792 &Context->Idents.get("FuncPtr"), in SynthesizeBlockCall()
3793 Context->VoidPtrTy, nullptr, in SynthesizeBlockCall()
3797 *Context, PE, true, FD, FD->getType(), VK_LValue, OK_Ordinary); in SynthesizeBlockCall()
3799 CastExpr *FunkCast = NoTypeInfoCStyleCastExpr(Context, PtrToFuncCastType, in SynthesizeBlockCall()
3801 PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), FunkCast); in SynthesizeBlockCall()
3812 CallExpr::Create(*Context, PE, BlkExprs, Exp->getType(), VK_PRValue, in SynthesizeBlockCall()
3837 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in RewriteBlockDeclRefExpr()
3839 &Context->Idents.get("__forwarding"), in RewriteBlockDeclRefExpr()
3840 Context->VoidPtrTy, nullptr, in RewriteBlockDeclRefExpr()
3844 MemberExpr::CreateImplicit(*Context, DeclRefExp, isArrow, FD, in RewriteBlockDeclRefExpr()
3848 FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), SourceLocation(), in RewriteBlockDeclRefExpr()
3849 &Context->Idents.get(Name), in RewriteBlockDeclRefExpr()
3850 Context->VoidPtrTy, nullptr, in RewriteBlockDeclRefExpr()
3853 ME = MemberExpr::CreateImplicit(*Context, ME, true, FD, DeclRefExp->getType(), in RewriteBlockDeclRefExpr()
3857 ParenExpr *PE = new (Context) ParenExpr(DeclRefExp->getExprLoc(), in RewriteBlockDeclRefExpr()
3873 const_cast<ASTContext &>(*Context), DRE, UO_Deref, DRE->getType(), in RewriteLocalVariableExternalStorage()
3876 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in RewriteLocalVariableExternalStorage()
4123 static_cast<unsigned>(Context->getTypeSize(Context->IntTy)); in SynthesizeByrefCopyDestroyHelper()
4125 static_cast<unsigned>(Context->getTypeSize(Context->VoidPtrTy)); in SynthesizeByrefCopyDestroyHelper()
4127 unsigned offset = (VoidPtrSize*4 + IntSize + IntSize)/Context->getCharWidth(); in SynthesizeByrefCopyDestroyHelper()
4193 bool HasCopyAndDispose = Context->BlockRequiresCopying(Ty, ND); in RewriteByRefVar()
4201 T.getAsStringInternal(Name, Context->getPrintingPolicy()); in RewriteByRefVar()
4342 IdentifierInfo *ID = &Context->Idents.get(name); in SynthBlockInitFunctionDecl()
4343 QualType FType = Context->getFunctionNoProtoType(Context->VoidPtrTy); in SynthBlockInitFunctionDecl()
4344 return FunctionDecl::Create(*Context, TUDecl, SourceLocation(), in SynthBlockInitFunctionDecl()
4403 QualType FType = Context->getPointerType(BFT); in SynthBlockInitExpr()
4410 DeclRefExpr *DRE = new (Context) in SynthBlockInitExpr()
4411 DeclRefExpr(*Context, FD, false, FType, VK_PRValue, SourceLocation()); in SynthBlockInitExpr()
4417 DeclRefExpr *Arg = new (Context) DeclRefExpr( in SynthBlockInitExpr()
4418 *Context, FD, false, FD->getType(), VK_LValue, SourceLocation()); in SynthBlockInitExpr()
4420 NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy, CK_BitCast, Arg); in SynthBlockInitExpr()
4427 *Context, TUDecl, SourceLocation(), SourceLocation(), in SynthBlockInitExpr()
4428 &Context->Idents.get(DescData), Context->VoidPtrTy, nullptr, SC_Static); in SynthBlockInitExpr()
4430 const_cast<ASTContext &>(*Context), in SynthBlockInitExpr()
4431 new (Context) DeclRefExpr(*Context, NewVD, false, Context->VoidPtrTy, in SynthBlockInitExpr()
4433 UO_AddrOf, Context->getPointerType(Context->VoidPtrTy), VK_PRValue, in SynthBlockInitExpr()
4446 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
4450 QT = Context->getPointerType(QT); in SynthBlockInitExpr()
4451 Exp = UnaryOperator::Create(const_cast<ASTContext &>(*Context), Exp, in SynthBlockInitExpr()
4458 Arg = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
4460 Exp = NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy, CK_BitCast, in SynthBlockInitExpr()
4464 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
4468 QT = Context->getPointerType(QT); in SynthBlockInitExpr()
4469 Exp = UnaryOperator::Create(const_cast<ASTContext &>(*Context), Exp, in SynthBlockInitExpr()
4484 IdentifierInfo *II = &Context->Idents.get(RecName.c_str() in SynthBlockInitExpr()
4487 RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in SynthBlockInitExpr()
4490 QualType castT = Context->getPointerType(Context->getTagDeclType(RD)); in SynthBlockInitExpr()
4493 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
4510 const_cast<ASTContext &>(*Context), Exp, UO_AddrOf, in SynthBlockInitExpr()
4511 Context->getPointerType(Exp->getType()), VK_PRValue, OK_Ordinary, in SynthBlockInitExpr()
4513 Exp = NoTypeInfoCStyleCastExpr(Context, castT, CK_BitCast, Exp); in SynthBlockInitExpr()
4521 static_cast<unsigned>(Context->getTypeSize(Context->IntTy)); in SynthBlockInitExpr()
4522 Expr *FlagExp = IntegerLiteral::Create(*Context, llvm::APInt(IntSize, flag), in SynthBlockInitExpr()
4523 Context->IntTy, SourceLocation()); in SynthBlockInitExpr()
4526 NewRep = CallExpr::Create(*Context, DRE, InitExprs, FType, VK_LValue, in SynthBlockInitExpr()
4529 const_cast<ASTContext &>(*Context), NewRep, UO_AddrOf, in SynthBlockInitExpr()
4530 Context->getPointerType(NewRep->getType()), VK_PRValue, OK_Ordinary, in SynthBlockInitExpr()
4532 NewRep = NoTypeInfoCStyleCastExpr(Context, FType, CK_BitCast, in SynthBlockInitExpr()
4750 CastExpr *Replacement = new (Context) CastExpr(ICE->getType(), in RewriteFunctionBodyOrGlobalInitializer()
5127 std::string MethodTypeString = Context->getObjCEncodingForMethodDecl(*I); in RewriteObjCProtocolMetaData()
5164 std::string MethodTypeString = Context->getObjCEncodingForMethodDecl(*I); in RewriteObjCProtocolMetaData()
5327 Context->getObjCEncodingForType(IVI->getType(), TmpString, *IVI); in RewriteObjCClassMetaData()
5338 Context->getObjCEncodingForType(IVI->getType(), TmpString, *IVI); in RewriteObjCClassMetaData()
5774 Context->getObjCEncodingForMethodDecl(*MethodBegin); in RewriteObjCMethodsMetaData()
5784 Context->getObjCEncodingForMethodDecl(*MethodBegin); in RewriteObjCMethodsMetaData()
5823 IdentifierInfo *II = &Context->Idents.get(RecName); in RewriteObjCIvarRefExpr()
5825 RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in RewriteObjCIvarRefExpr()
5828 QualType castT = Context->getPointerType(Context->getTagDeclType(RD)); in RewriteObjCIvarRefExpr()
5829 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, castT, in RewriteObjCIvarRefExpr()
5833 ParenExpr *PE = new (Context) ParenExpr(OldRange.getBegin(), in RewriteObjCIvarRefExpr()
5840 *Context, PE, true, D, D->getType(), VK_LValue, OK_Ordinary); in RewriteObjCIvarRefExpr()
5864 IdentifierInfo *II = &Context->Idents.get(RecName); in RewriteObjCIvarRefExpr()
5866 RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in RewriteObjCIvarRefExpr()
5869 QualType castT = Context->getPointerType(Context->getTagDeclType(RD)); in RewriteObjCIvarRefExpr()
5870 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, castT, in RewriteObjCIvarRefExpr()
5874 ParenExpr *PE = new (Context) ParenExpr( in RewriteObjCIvarRefExpr()