Lines Matching refs:Context
67 ASTContext *Context; member in __anon0b295c890111::RewriteObjC
219 Diags.Report(Context->getFullLoc(Old->getBeginLoc()), RewriteFailedDiag) in ReplaceStmtWithRange()
236 Diags.Report(Context->getFullLoc(Old->getBeginLoc()), RewriteFailedDiag) in ReplaceStmtWithRange()
247 Diags.Report(Context->getFullLoc(Loc), RewriteFailedDiag); in InsertText()
257 Diags.Report(Context->getFullLoc(Start), RewriteFailedDiag); in ReplaceText()
421 T = Context->getPointerType(BPT->getPointeeType()); in convertBlockPointerToFunctionPointer()
435 T = Context->getObjCIdType(); in convertToUnqualifiedObjCType()
437 T = Context->getObjCClassType(); in convertToUnqualifiedObjCType()
444 T = Context->getPointerType(T); in convertToUnqualifiedObjCType()
454 QualType OCT = Context->getCanonicalType(T).getUnqualifiedType(); in isObjCType()
456 if (OCT == Context->getCanonicalType(Context->getObjCIdType()) || in isObjCType()
457 OCT == Context->getCanonicalType(Context->getObjCClassType())) in isObjCType()
484 if (result == Context->getObjCInstanceType()) in getSimpleFunctionType()
485 result = Context->getObjCIdType(); in getSimpleFunctionType()
488 return Context->getFunctionType(result, args, fpi); in getSimpleFunctionType()
500 QualType StrType = Context->getConstantArrayType( in getStringLiteral()
501 Context->CharTy, llvm::APInt(32, Str.size() + 1), ArrayType::Normal, in getStringLiteral()
503 return StringLiteral::Create(*Context, Str, StringLiteral::Ascii, 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()
823 FT->getParamType(i).getAsString(Context->getPrintingPolicy()); in RewritePropertyImplDecl()
1053 FPRetType->getReturnType().getAsString(Context->getPrintingPolicy()); in RewriteTypeIntoString()
1057 ResultStr += T.getAsString(Context->getPrintingPolicy()); in RewriteTypeIntoString()
1103 QualType selfTy = Context->getObjCInterfaceType(IDecl); in RewriteObjCMethodDecl()
1104 selfTy = Context->getPointerType(selfTy); in RewriteObjCMethodDecl()
1114 ResultStr += Context->getObjCClassType().getAsString( in RewriteObjCMethodDecl()
1115 Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1118 ResultStr += Context->getObjCSelType().getAsString(Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1132 QT.getAsStringInternal(Name, Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1149 FT->getParamType(i).getAsString(Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1263 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitSetter()
1276 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitSetter()
1290 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitSetter()
1339 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitGetter()
1352 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitGetter()
1366 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitGetter()
1495 elementTypeAsString = ElementType.getAsString(Context->getPrintingPolicy()); in RewriteObjCForCollectionStmt()
1511 elementTypeAsString = VD->getType().getAsString(Context->getPrintingPolicy()); in RewriteObjCForCollectionStmt()
1690 syncExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in RewriteObjCSynchronizedStmt()
1722 Diags.Report(Context->getFullLoc(S->getBeginLoc()), in WarnAboutReturnGotoStmts()
1852 if (t == Context->getObjCIdType()) { in RewriteObjCTryStmt()
1980 Context->getObjCEncodingForType(Exp->getEncodedType(), StrEncoding); in RewriteAtEncode()
2012 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl()
2016 QualType pToFunc = Context->getPointerType(msgSendType); in SynthesizeCallToFunctionDecl()
2018 ImplicitCastExpr::Create(*Context, pToFunc, CK_FunctionToPointerDecay, in SynthesizeCallToFunctionDecl()
2024 *Context, ICE, Args, FT->getCallResultType(*Context), VK_RValue, EndLoc); in SynthesizeCallToFunctionDecl()
2069 QualType ElemTy = Context->getBaseElementType(T); in needToScanForQualifiers()
2195 std::string TypeAsString(QT.getAsString(Context->getPrintingPolicy())); in RewriteTypeOfDecl()
2221 IdentifierInfo *SelGetUidIdent = &Context->Idents.get("sel_registerName"); in SynthSelGetUidFunctionDecl()
2223 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst())); in SynthSelGetUidFunctionDecl()
2225 getSimpleFunctionType(Context->getObjCSelType(), ArgTys); in SynthSelGetUidFunctionDecl()
2226 SelGetUidFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthSelGetUidFunctionDecl()
2244 std::string TypeString(Type.getAsString(Context->getPrintingPolicy())); in RewriteBlockPointerType()
2260 std::string TypeString(Type.getAsString(Context->getPrintingPolicy())); in RewriteBlockPointerTypeVariable()
2293 std::string FdStr = Type.getAsString(Context->getPrintingPolicy()); in RewriteBlockLiteralFunctionDecl()
2313 IdentifierInfo *msgSendIdent = &Context->Idents.get("__rw_objc_super"); in SynthSuperConstructorFunctionDecl()
2315 QualType argT = Context->getObjCIdType(); in SynthSuperConstructorFunctionDecl()
2319 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthSuperConstructorFunctionDecl()
2321 SuperConstructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthSuperConstructorFunctionDecl()
2330 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend"); in SynthMsgSendFunctionDecl()
2332 QualType argT = Context->getObjCIdType(); in SynthMsgSendFunctionDecl()
2335 argT = Context->getObjCSelType(); in SynthMsgSendFunctionDecl()
2338 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendFunctionDecl()
2340 MsgSendFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendFunctionDecl()
2349 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSendSuper"); in SynthMsgSendSuperFunctionDecl()
2351 RecordDecl *RD = RecordDecl::Create(*Context, TTK_Struct, TUDecl, in SynthMsgSendSuperFunctionDecl()
2353 &Context->Idents.get("objc_super")); in SynthMsgSendSuperFunctionDecl()
2354 QualType argT = Context->getPointerType(Context->getTagDeclType(RD)); in SynthMsgSendSuperFunctionDecl()
2357 argT = Context->getObjCSelType(); in SynthMsgSendSuperFunctionDecl()
2360 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendSuperFunctionDecl()
2362 MsgSendSuperFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendSuperFunctionDecl()
2371 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend_stret"); in SynthMsgSendStretFunctionDecl()
2373 QualType argT = Context->getObjCIdType(); in SynthMsgSendStretFunctionDecl()
2376 argT = Context->getObjCSelType(); in SynthMsgSendStretFunctionDecl()
2379 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendStretFunctionDecl()
2381 MsgSendStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendStretFunctionDecl()
2392 &Context->Idents.get("objc_msgSendSuper_stret"); in SynthMsgSendSuperStretFunctionDecl()
2394 RecordDecl *RD = RecordDecl::Create(*Context, TTK_Struct, TUDecl, in SynthMsgSendSuperStretFunctionDecl()
2396 &Context->Idents.get("objc_super")); in SynthMsgSendSuperStretFunctionDecl()
2397 QualType argT = Context->getPointerType(Context->getTagDeclType(RD)); in SynthMsgSendSuperStretFunctionDecl()
2400 argT = Context->getObjCSelType(); in SynthMsgSendSuperStretFunctionDecl()
2403 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendSuperStretFunctionDecl()
2405 MsgSendSuperStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendSuperStretFunctionDecl()
2415 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend_fpret"); in SynthMsgSendFpretFunctionDecl()
2417 QualType argT = Context->getObjCIdType(); in SynthMsgSendFpretFunctionDecl()
2420 argT = Context->getObjCSelType(); in SynthMsgSendFpretFunctionDecl()
2423 QualType msgSendType = getSimpleFunctionType(Context->DoubleTy, in SynthMsgSendFpretFunctionDecl()
2425 MsgSendFpretFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendFpretFunctionDecl()
2434 IdentifierInfo *getClassIdent = &Context->Idents.get("objc_getClass"); in SynthGetClassFunctionDecl()
2436 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst())); in SynthGetClassFunctionDecl()
2437 QualType getClassType = getSimpleFunctionType(Context->getObjCIdType(), in SynthGetClassFunctionDecl()
2439 GetClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthGetClassFunctionDecl()
2449 &Context->Idents.get("class_getSuperclass"); in SynthGetSuperClassFunctionDecl()
2451 ArgTys.push_back(Context->getObjCClassType()); in SynthGetSuperClassFunctionDecl()
2452 QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(), in SynthGetSuperClassFunctionDecl()
2454 GetSuperClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthGetSuperClassFunctionDecl()
2464 IdentifierInfo *getClassIdent = &Context->Idents.get("objc_getMetaClass"); in SynthGetMetaClassFunctionDecl()
2466 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst())); in SynthGetMetaClassFunctionDecl()
2467 QualType getClassType = getSimpleFunctionType(Context->getObjCIdType(), in SynthGetMetaClassFunctionDecl()
2469 GetMetaClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthGetMetaClassFunctionDecl()
2505 VarDecl *NewVD = VarDecl::Create(*Context, TUDecl, SourceLocation(), in RewriteObjCStringLiteral()
2506 SourceLocation(), &Context->Idents.get(S), in RewriteObjCStringLiteral()
2508 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral()
2509 DeclRefExpr(*Context, NewVD, false, strType, VK_LValue, SourceLocation()); in RewriteObjCStringLiteral()
2510 Expr *Unop = new (Context) in RewriteObjCStringLiteral()
2511 UnaryOperator(DRE, UO_AddrOf, Context->getPointerType(DRE->getType()), in RewriteObjCStringLiteral()
2514 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, Exp->getType(), in RewriteObjCStringLiteral()
2524 SuperStructDecl = RecordDecl::Create(*Context, TTK_Struct, TUDecl, in getSuperStructType()
2526 &Context->Idents.get("objc_super")); in getSuperStructType()
2530 FieldTypes[0] = Context->getObjCIdType(); in getSuperStructType()
2532 FieldTypes[1] = Context->getObjCClassType(); in getSuperStructType()
2536 SuperStructDecl->addDecl(FieldDecl::Create(*Context, SuperStructDecl, in getSuperStructType()
2547 return Context->getTagDeclType(SuperStructDecl); in getSuperStructType()
2552 ConstantStringDecl = RecordDecl::Create(*Context, TTK_Struct, TUDecl, in getConstantStringStructType()
2554 &Context->Idents.get("__NSConstantStringImpl")); in getConstantStringStructType()
2558 FieldTypes[0] = Context->getObjCIdType(); in getConstantStringStructType()
2560 FieldTypes[1] = Context->IntTy; in getConstantStringStructType()
2562 FieldTypes[2] = Context->getPointerType(Context->CharTy); in getConstantStringStructType()
2564 FieldTypes[3] = Context->LongTy; in getConstantStringStructType()
2568 ConstantStringDecl->addDecl(FieldDecl::Create(*Context, in getConstantStringStructType()
2580 return Context->getTagDeclType(ConstantStringDecl); in getConstantStringStructType()
2591 new (Context) DeclRefExpr(*Context, MsgSendStretFlavor, false, in SynthMsgSendStretCallExpr()
2594 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, in SynthMsgSendStretCallExpr()
2595 Context->getPointerType(Context->VoidTy), in SynthMsgSendStretCallExpr()
2601 castType = Context->getPointerType(castType); in SynthMsgSendStretCallExpr()
2602 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast, in SynthMsgSendStretCallExpr()
2606 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), cast); in SynthMsgSendStretCallExpr()
2609 CallExpr *STCE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(), in SynthMsgSendStretCallExpr()
2663 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
2665 new (Context) DeclRefExpr(*Context, in SynthMessageExpr()
2668 Context->getObjCIdType(), in SynthMessageExpr()
2679 CastExpr *ArgExpr = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2680 Context->getObjCClassType(), in SynthMessageExpr()
2689 NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2690 Context->getObjCIdType(), in SynthMessageExpr()
2699 DeclRefExpr *DRE = new (Context) in SynthMessageExpr()
2700 DeclRefExpr(*Context, SuperConstructorFunctionDecl, false, superType, in SynthMessageExpr()
2702 SuperRep = CallExpr::Create(*Context, DRE, InitExprs, superType, in SynthMessageExpr()
2710 SuperRep = new (Context) UnaryOperator(SuperRep, UO_AddrOf, in SynthMessageExpr()
2711 Context->getPointerType(SuperRep->getType()), in SynthMessageExpr()
2714 SuperRep = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2715 Context->getPointerType(superType), in SynthMessageExpr()
2720 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs, in SynthMessageExpr()
2723 = Context->getTrivialTypeSourceInfo(superType); in SynthMessageExpr()
2724 SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), superTInfo, in SynthMessageExpr()
2728 SuperRep = new (Context) UnaryOperator(SuperRep, UO_AddrOf, in SynthMessageExpr()
2729 Context->getPointerType(SuperRep->getType()), in SynthMessageExpr()
2758 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
2760 new (Context) DeclRefExpr(*Context, in SynthMessageExpr()
2763 Context->getObjCIdType(), in SynthMessageExpr()
2773 CastExpr *ArgExpr = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2774 Context->getObjCClassType(), in SynthMessageExpr()
2785 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
2794 DeclRefExpr *DRE = new (Context) in SynthMessageExpr()
2795 DeclRefExpr(*Context, SuperConstructorFunctionDecl, false, superType, in SynthMessageExpr()
2797 SuperRep = CallExpr::Create(*Context, DRE, InitExprs, superType, in SynthMessageExpr()
2805 SuperRep = new (Context) UnaryOperator(SuperRep, UO_AddrOf, in SynthMessageExpr()
2806 Context->getPointerType(SuperRep->getType()), in SynthMessageExpr()
2809 SuperRep = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2810 Context->getPointerType(superType), in SynthMessageExpr()
2815 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs, in SynthMessageExpr()
2818 = Context->getTrivialTypeSourceInfo(superType); in SynthMessageExpr()
2819 SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), superTInfo, in SynthMessageExpr()
2838 recExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
2860 type = Context->getObjCIdType(); in SynthMessageExpr()
2865 if (SubExpr->getType()->isIntegralType(*Context) && in SynthMessageExpr()
2880 userExpr = NoTypeInfoCStyleCastExpr(Context, type, CK, userExpr); in SynthMessageExpr()
2888 if (userExpr->getType()->isIntegralType(*Context)) { in SynthMessageExpr()
2897 userExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
2914 ArgTypes.push_back(Context->getPointerType(getSuperStructType())); in SynthMessageExpr()
2916 ArgTypes.push_back(Context->getObjCIdType()); in SynthMessageExpr()
2917 ArgTypes.push_back(Context->getObjCSelType()); in SynthMessageExpr()
2922 ? Context->getObjCIdType() in SynthMessageExpr()
2932 returnType = Context->getObjCIdType(); in SynthMessageExpr()
2938 DeclRefExpr *DRE = new (Context) DeclRefExpr( in SynthMessageExpr()
2939 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation()); in SynthMessageExpr()
2945 cast = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
2946 Context->getPointerType(Context->VoidTy), in SynthMessageExpr()
2954 castType = Context->getPointerType(castType); in SynthMessageExpr()
2955 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast, in SynthMessageExpr()
2959 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast); in SynthMessageExpr()
2962 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(), in SynthMessageExpr()
2978 new (Context) UnaryExprOrTypeTraitExpr(UETT_SizeOf, in SynthMessageExpr()
2979 Context->getTrivialTypeSourceInfo(returnType), in SynthMessageExpr()
2980 Context->getSizeType(), SourceLocation(), in SynthMessageExpr()
2987 static_cast<unsigned>(Context->getTypeSize(Context->IntTy)); in SynthMessageExpr()
2988 IntegerLiteral *limit = IntegerLiteral::Create(*Context, in SynthMessageExpr()
2990 Context->IntTy, in SynthMessageExpr()
2993 new (Context) BinaryOperator(sizeofExpr, limit, BO_LE, Context->IntTy, in SynthMessageExpr()
2998 new (Context) ConditionalOperator(lessThanExpr, 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()
3045 Expr *DerefExpr = new (Context) UnaryOperator(DRE, UO_AddrOf, in RewriteObjCProtocolExpr()
3046 Context->getPointerType(DRE->getType()), in RewriteObjCProtocolExpr()
3048 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, DerefExpr->getType(), in RewriteObjCProtocolExpr()
3257 std::string S = "static " + RT.getAsString(Context->getPrintingPolicy()) + " __" + in SynthesizeBlockFunc()
3281 QT.getAsStringInternal(ParamStr, Context->getPrintingPolicy()); in SynthesizeBlockFunc()
3329 QT = Context->getPointerType(QT); in SynthesizeBlockFunc()
3330 QT.getAsStringInternal(Name, Context->getPrintingPolicy()); in SynthesizeBlockFunc()
3423 QT = Context->getPointerType(QT); in SynthesizeBlockImpl()
3424 QT.getAsStringInternal(FieldName, Context->getPrintingPolicy()); in SynthesizeBlockImpl()
3425 QT.getAsStringInternal(ArgName, Context->getPrintingPolicy()); in SynthesizeBlockImpl()
3740 new (Context) ConditionalOperator(CONDExp, in SynthesizeBlockCall()
3759 RecordDecl *RD = RecordDecl::Create(*Context, TTK_Struct, TUDecl, in SynthesizeBlockCall()
3761 &Context->Idents.get("__block_impl")); in SynthesizeBlockCall()
3762 QualType PtrBlock = Context->getPointerType(Context->getTagDeclType(RD)); in SynthesizeBlockCall()
3781 PtrToFuncCastType = Context->getPointerType(PtrToFuncCastType); in SynthesizeBlockCall()
3783 CastExpr *BlkCast = NoTypeInfoCStyleCastExpr(Context, PtrBlock, in SynthesizeBlockCall()
3787 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in SynthesizeBlockCall()
3791 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in SynthesizeBlockCall()
3793 &Context->Idents.get("FuncPtr"), in SynthesizeBlockCall()
3794 Context->VoidPtrTy, nullptr, in SynthesizeBlockCall()
3798 new (Context) MemberExpr(PE, true, SourceLocation(), FD, SourceLocation(), in SynthesizeBlockCall()
3801 CastExpr *FunkCast = NoTypeInfoCStyleCastExpr(Context, PtrToFuncCastType, in SynthesizeBlockCall()
3803 PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), FunkCast); in SynthesizeBlockCall()
3813 CallExpr *CE = CallExpr::Create(*Context, PE, BlkExprs, Exp->getType(), in SynthesizeBlockCall()
3838 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in RewriteBlockDeclRefExpr()
3840 &Context->Idents.get("__forwarding"), in RewriteBlockDeclRefExpr()
3841 Context->VoidPtrTy, nullptr, in RewriteBlockDeclRefExpr()
3844 MemberExpr *ME = new (Context) in RewriteBlockDeclRefExpr()
3849 FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), SourceLocation(), in RewriteBlockDeclRefExpr()
3850 &Context->Idents.get(Name), in RewriteBlockDeclRefExpr()
3851 Context->VoidPtrTy, nullptr, in RewriteBlockDeclRefExpr()
3855 new (Context) MemberExpr(ME, true, SourceLocation(), FD, SourceLocation(), in RewriteBlockDeclRefExpr()
3859 ParenExpr *PE = new (Context) ParenExpr(DeclRefExp->getExprLoc(), in RewriteBlockDeclRefExpr()
3874 Expr *Exp = new (Context) UnaryOperator(DRE, UO_Deref, DRE->getType(), in RewriteLocalVariableExternalStorage()
3878 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in RewriteLocalVariableExternalStorage()
4125 static_cast<unsigned>(Context->getTypeSize(Context->IntTy)); in SynthesizeByrefCopyDestroyHelper()
4127 static_cast<unsigned>(Context->getTypeSize(Context->VoidPtrTy)); in SynthesizeByrefCopyDestroyHelper()
4129 unsigned offset = (VoidPtrSize*4 + IntSize + IntSize)/Context->getCharWidth(); in SynthesizeByrefCopyDestroyHelper()
4195 bool HasCopyAndDispose = Context->BlockRequiresCopying(Ty, ND); in RewriteByRefVar()
4203 T.getAsStringInternal(Name, Context->getPrintingPolicy()); in RewriteByRefVar()
4344 IdentifierInfo *ID = &Context->Idents.get(name); in SynthBlockInitFunctionDecl()
4345 QualType FType = Context->getFunctionNoProtoType(Context->VoidPtrTy); in SynthBlockInitFunctionDecl()
4346 return FunctionDecl::Create(*Context, TUDecl, SourceLocation(), in SynthBlockInitFunctionDecl()
4405 QualType FType = Context->getPointerType(BFT); in SynthBlockInitExpr()
4412 DeclRefExpr *DRE = new (Context) in SynthBlockInitExpr()
4413 DeclRefExpr(*Context, FD, false, FType, VK_RValue, SourceLocation()); in SynthBlockInitExpr()
4419 DeclRefExpr *Arg = new (Context) DeclRefExpr( in SynthBlockInitExpr()
4420 *Context, FD, false, FD->getType(), VK_LValue, SourceLocation()); in SynthBlockInitExpr()
4422 NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy, CK_BitCast, Arg); in SynthBlockInitExpr()
4429 *Context, TUDecl, SourceLocation(), SourceLocation(), in SynthBlockInitExpr()
4430 &Context->Idents.get(DescData), Context->VoidPtrTy, nullptr, SC_Static); in SynthBlockInitExpr()
4431 UnaryOperator *DescRefExpr = new (Context) UnaryOperator( in SynthBlockInitExpr()
4432 new (Context) DeclRefExpr(*Context, NewVD, false, Context->VoidPtrTy, in SynthBlockInitExpr()
4434 UO_AddrOf, Context->getPointerType(Context->VoidPtrTy), VK_RValue, in SynthBlockInitExpr()
4447 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
4451 QT = Context->getPointerType(QT); in SynthBlockInitExpr()
4452 Exp = new (Context) UnaryOperator(Exp, UO_AddrOf, QT, VK_RValue, 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 = new (Context) UnaryOperator(Exp, UO_AddrOf, QT, VK_RValue, in SynthBlockInitExpr()
4483 IdentifierInfo *II = &Context->Idents.get(RecName.c_str() in SynthBlockInitExpr()
4485 RecordDecl *RD = RecordDecl::Create(*Context, TTK_Struct, TUDecl, in SynthBlockInitExpr()
4489 QualType castT = Context->getPointerType(Context->getTagDeclType(RD)); in SynthBlockInitExpr()
4492 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
4508 Exp = new (Context) UnaryOperator( in SynthBlockInitExpr()
4509 Exp, UO_AddrOf, Context->getPointerType(Exp->getType()), VK_RValue, in SynthBlockInitExpr()
4511 Exp = NoTypeInfoCStyleCastExpr(Context, castT, CK_BitCast, Exp); in SynthBlockInitExpr()
4519 static_cast<unsigned>(Context->getTypeSize(Context->IntTy)); in SynthBlockInitExpr()
4520 Expr *FlagExp = IntegerLiteral::Create(*Context, llvm::APInt(IntSize, flag), in SynthBlockInitExpr()
4521 Context->IntTy, SourceLocation()); in SynthBlockInitExpr()
4524 NewRep = CallExpr::Create(*Context, DRE, InitExprs, FType, VK_LValue, in SynthBlockInitExpr()
4526 NewRep = new (Context) UnaryOperator( in SynthBlockInitExpr()
4527 NewRep, UO_AddrOf, Context->getPointerType(NewRep->getType()), VK_RValue, in SynthBlockInitExpr()
4529 NewRep = NoTypeInfoCStyleCastExpr(Context, FType, CK_BitCast, in SynthBlockInitExpr()
4747 CastExpr *Replacement = new (Context) CastExpr(ICE->getType(), in RewriteFunctionBodyOrGlobalInitializer()
5124 std::string MethodTypeString = Context->getObjCEncodingForMethodDecl(*I); in RewriteObjCProtocolMetaData()
5161 std::string MethodTypeString = Context->getObjCEncodingForMethodDecl(*I); in RewriteObjCProtocolMetaData()
5325 Context->getObjCEncodingForType(IVI->getType(), TmpString, *IVI); in RewriteObjCClassMetaData()
5336 Context->getObjCEncodingForType(IVI->getType(), TmpString, *IVI); in RewriteObjCClassMetaData()
5772 Context->getObjCEncodingForMethodDecl(*MethodBegin); in RewriteObjCMethodsMetaData()
5782 Context->getObjCEncodingForMethodDecl(*MethodBegin); in RewriteObjCMethodsMetaData()
5820 IdentifierInfo *II = &Context->Idents.get(RecName); in RewriteObjCIvarRefExpr()
5821 RecordDecl *RD = RecordDecl::Create(*Context, TTK_Struct, TUDecl, in RewriteObjCIvarRefExpr()
5825 QualType castT = Context->getPointerType(Context->getTagDeclType(RD)); in RewriteObjCIvarRefExpr()
5826 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, castT, in RewriteObjCIvarRefExpr()
5830 ParenExpr *PE = new (Context) ParenExpr(OldRange.getBegin(), in RewriteObjCIvarRefExpr()
5835 MemberExpr *ME = new (Context) in RewriteObjCIvarRefExpr()
5860 IdentifierInfo *II = &Context->Idents.get(RecName); in RewriteObjCIvarRefExpr()
5861 RecordDecl *RD = RecordDecl::Create(*Context, TTK_Struct, TUDecl, in RewriteObjCIvarRefExpr()
5865 QualType castT = Context->getPointerType(Context->getTagDeclType(RD)); in RewriteObjCIvarRefExpr()
5866 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, castT, in RewriteObjCIvarRefExpr()
5870 ParenExpr *PE = new (Context) ParenExpr( in RewriteObjCIvarRefExpr()