Lines Matching refs:Context
68 ASTContext *Context; member in __anonceb1b5150111::RewriteModernObjC
268 Diags.Report(Context->getFullLoc(Old->getBeginLoc()), RewriteFailedDiag) in ReplaceStmtWithRange()
285 Diags.Report(Context->getFullLoc(Old->getBeginLoc()), RewriteFailedDiag) in ReplaceStmtWithRange()
296 Diags.Report(Context->getFullLoc(Loc), RewriteFailedDiag); in InsertText()
306 Diags.Report(Context->getFullLoc(Start), RewriteFailedDiag); in ReplaceText()
510 T = Context->getPointerType(BPT->getPointeeType()); in convertBlockPointerToFunctionPointer()
526 T = isConst ? Context->getObjCIdType().withConst() in convertToUnqualifiedObjCType()
527 : Context->getObjCIdType(); in convertToUnqualifiedObjCType()
530 T = Context->getObjCClassType(); in convertToUnqualifiedObjCType()
537 T = Context->getPointerType(T); in convertToUnqualifiedObjCType()
547 QualType OCT = Context->getCanonicalType(T).getUnqualifiedType(); in isObjCType()
549 if (OCT == Context->getCanonicalType(Context->getObjCIdType()) || in isObjCType()
550 OCT == Context->getCanonicalType(Context->getObjCClassType())) in isObjCType()
578 if (result == Context->getObjCInstanceType()) in getSimpleFunctionType()
579 result = Context->getObjCIdType(); in getSimpleFunctionType()
582 return Context->getFunctionType(result, args, fpi); in getSimpleFunctionType()
595 IdentifierInfo* II = &Context->Idents.get("load"); in ImplementationIsNonLazy()
596 Selector LoadSel = Context->Selectors.getSelector(0, &II); in ImplementationIsNonLazy()
601 QualType StrType = Context->getConstantArrayType( in getStringLiteral()
602 Context->CharTy, llvm::APInt(32, Str.size() + 1), nullptr, in getStringLiteral()
604 return StringLiteral::Create(*Context, Str, StringLiteralKind::Ordinary, in getStringLiteral()
674 Context = &context; in InitializeCommon()
675 SM = &Context->getSourceManager(); in InitializeCommon()
676 TUDecl = Context->getTranslationUnitDecl(); in InitializeCommon()
710 Rewrite.setSourceMgr(Context->getSourceManager(), Context->getLangOpts()); in InitializeCommon()
867 RecordDecl *RD = RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in getIvarAccessString()
869 &Context->Idents.get(RecName)); in getIvarAccessString()
870 QualType PtrStructIMPL = Context->getPointerType(Context->getTagDeclType(RD)); in getIvarAccessString()
872 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy)); in getIvarAccessString()
873 Expr *Zero = IntegerLiteral::Create(*Context, in getIvarAccessString()
875 Context->UnsignedIntTy, SourceLocation()); in getIvarAccessString()
876 Zero = NoTypeInfoCStyleCastExpr(Context, PtrStructIMPL, CK_BitCast, Zero); in getIvarAccessString()
877 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in getIvarAccessString()
879 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in getIvarAccessString()
881 &Context->Idents.get(D->getNameAsString()), in getIvarAccessString()
886 *Context, PE, true, FD, FD->getType(), VK_LValue, OK_Ordinary); in getIvarAccessString()
887 IvarT = Context->getDecltypeType(ME, ME->getType()); in getIvarAccessString()
891 QualType castT = Context->getPointerType(IvarT); in getIvarAccessString()
892 std::string TypeString(castT.getAsString(Context->getPrintingPolicy())); in getIvarAccessString()
978 FT->getParamType(i).getAsString(Context->getPrintingPolicy()); in RewritePropertyImplDecl()
1223 FPRetType->getReturnType().getAsString(Context->getPrintingPolicy()); in RewriteTypeIntoString()
1227 ResultStr += T.getAsString(Context->getPrintingPolicy()); in RewriteTypeIntoString()
1273 QualType selfTy = Context->getObjCInterfaceType(IDecl); in RewriteObjCMethodDecl()
1274 selfTy = Context->getPointerType(selfTy); in RewriteObjCMethodDecl()
1284 ResultStr += Context->getObjCClassType().getAsString( in RewriteObjCMethodDecl()
1285 Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1288 ResultStr += Context->getObjCSelType().getAsString(Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1302 QT.getAsStringInternal(Name, Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1319 FT->getParamType(i).getAsString(Context->getPrintingPolicy()); in RewriteObjCMethodDecl()
1456 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitSetter()
1469 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitSetter()
1483 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitSetter()
1539 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitGetter()
1552 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitGetter()
1566 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(), in RewritePropertyOrImplicitGetter()
1711 elementTypeAsString = ElementType.getAsString(Context->getPrintingPolicy()); in RewriteObjCForCollectionStmt()
1727 elementTypeAsString = VD->getType().getAsString(Context->getPrintingPolicy()); in RewriteObjCForCollectionStmt()
1922 Diags.Report(Context->getFullLoc(S->getBeginLoc()), in WarnAboutReturnGotoStmts()
2072 Context->getObjCEncodingForType(Exp->getEncodedType(), StrEncoding); in RewriteAtEncode()
2104 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl()
2108 QualType pToFunc = Context->getPointerType(msgSendType); in SynthesizeCallToFunctionDecl()
2110 ImplicitCastExpr::Create(*Context, pToFunc, CK_FunctionToPointerDecay, in SynthesizeCallToFunctionDecl()
2115 CallExpr::Create(*Context, ICE, Args, FT->getCallResultType(*Context), in SynthesizeCallToFunctionDecl()
2161 QualType ElemTy = Context->getBaseElementType(T); in needToScanForQualifiers()
2291 std::string TypeAsString(QT.getAsString(Context->getPrintingPolicy())); in RewriteTypeOfDecl()
2317 IdentifierInfo *SelGetUidIdent = &Context->Idents.get("sel_registerName"); in SynthSelGetUidFunctionDecl()
2319 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst())); in SynthSelGetUidFunctionDecl()
2321 getSimpleFunctionType(Context->getObjCSelType(), ArgTys); in SynthSelGetUidFunctionDecl()
2322 SelGetUidFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthSelGetUidFunctionDecl()
2340 std::string TypeString(Type.getAsString(Context->getPrintingPolicy())); in RewriteBlockPointerType()
2356 std::string TypeString(Type.getAsString(Context->getPrintingPolicy())); in RewriteBlockPointerTypeVariable()
2389 std::string FdStr = Type.getAsString(Context->getPrintingPolicy()); in RewriteBlockLiteralFunctionDecl()
2412 IdentifierInfo *msgSendIdent = &Context->Idents.get("__rw_objc_super"); in SynthSuperConstructorFunctionDecl()
2414 QualType argT = Context->getObjCIdType(); in SynthSuperConstructorFunctionDecl()
2418 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthSuperConstructorFunctionDecl()
2420 SuperConstructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthSuperConstructorFunctionDecl()
2429 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend"); in SynthMsgSendFunctionDecl()
2431 QualType argT = Context->getObjCIdType(); in SynthMsgSendFunctionDecl()
2434 argT = Context->getObjCSelType(); in SynthMsgSendFunctionDecl()
2437 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendFunctionDecl()
2439 MsgSendFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendFunctionDecl()
2448 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSendSuper"); in SynthMsgSendSuperFunctionDecl()
2450 ArgTys.push_back(Context->VoidTy); in SynthMsgSendSuperFunctionDecl()
2451 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendSuperFunctionDecl()
2453 MsgSendSuperFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendSuperFunctionDecl()
2462 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend_stret"); in SynthMsgSendStretFunctionDecl()
2464 QualType argT = Context->getObjCIdType(); in SynthMsgSendStretFunctionDecl()
2467 argT = Context->getObjCSelType(); in SynthMsgSendStretFunctionDecl()
2470 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendStretFunctionDecl()
2472 MsgSendStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendStretFunctionDecl()
2483 &Context->Idents.get("objc_msgSendSuper_stret"); in SynthMsgSendSuperStretFunctionDecl()
2485 ArgTys.push_back(Context->VoidTy); in SynthMsgSendSuperStretFunctionDecl()
2486 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), in SynthMsgSendSuperStretFunctionDecl()
2488 MsgSendSuperStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendSuperStretFunctionDecl()
2498 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend_fpret"); in SynthMsgSendFpretFunctionDecl()
2500 QualType argT = Context->getObjCIdType(); in SynthMsgSendFpretFunctionDecl()
2503 argT = Context->getObjCSelType(); in SynthMsgSendFpretFunctionDecl()
2506 QualType msgSendType = getSimpleFunctionType(Context->DoubleTy, in SynthMsgSendFpretFunctionDecl()
2508 MsgSendFpretFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthMsgSendFpretFunctionDecl()
2517 IdentifierInfo *getClassIdent = &Context->Idents.get("objc_getClass"); in SynthGetClassFunctionDecl()
2519 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst())); in SynthGetClassFunctionDecl()
2520 QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(), in SynthGetClassFunctionDecl()
2522 GetClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthGetClassFunctionDecl()
2532 &Context->Idents.get("class_getSuperclass"); in SynthGetSuperClassFunctionDecl()
2534 ArgTys.push_back(Context->getObjCClassType()); in SynthGetSuperClassFunctionDecl()
2535 QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(), in SynthGetSuperClassFunctionDecl()
2537 GetSuperClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthGetSuperClassFunctionDecl()
2547 IdentifierInfo *getClassIdent = &Context->Idents.get("objc_getMetaClass"); in SynthGetMetaClassFunctionDecl()
2549 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst())); in SynthGetMetaClassFunctionDecl()
2550 QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(), in SynthGetMetaClassFunctionDecl()
2552 GetMetaClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl, in SynthGetMetaClassFunctionDecl()
2588 VarDecl *NewVD = VarDecl::Create(*Context, TUDecl, SourceLocation(), in RewriteObjCStringLiteral()
2589 SourceLocation(), &Context->Idents.get(S), in RewriteObjCStringLiteral()
2591 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral()
2592 DeclRefExpr(*Context, NewVD, false, strType, VK_LValue, SourceLocation()); in RewriteObjCStringLiteral()
2594 const_cast<ASTContext &>(*Context), DRE, UO_AddrOf, in RewriteObjCStringLiteral()
2595 Context->getPointerType(DRE->getType()), VK_PRValue, OK_Ordinary, in RewriteObjCStringLiteral()
2598 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, Exp->getType(), in RewriteObjCStringLiteral()
2607 static_cast<unsigned>(Context->getTypeSize(Context->IntTy)); in RewriteObjCBoolLiteralExpr()
2609 Expr *FlagExp = IntegerLiteral::Create(*Context, in RewriteObjCBoolLiteralExpr()
2611 Context->IntTy, Exp->getLocation()); in RewriteObjCBoolLiteralExpr()
2612 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, Context->ObjCBuiltinBoolTy, in RewriteObjCBoolLiteralExpr()
2614 ParenExpr *PE = new (Context) ParenExpr(Exp->getLocation(), Exp->getExprLoc(), in RewriteObjCBoolLiteralExpr()
2663 if (SubExpr->getType()->isIntegralType(*Context) && type->isBooleanType()) in RewriteObjCBoxedExpr()
2665 subExpr = NoTypeInfoCStyleCastExpr(Context, type, CK, subExpr); in RewriteObjCBoxedExpr()
2670 ArgTypes.push_back(Context->getObjCClassType()); in RewriteObjCBoxedExpr()
2671 ArgTypes.push_back(Context->getObjCSelType()); in RewriteObjCBoxedExpr()
2680 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCBoxedExpr()
2681 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation()); in RewriteObjCBoxedExpr()
2684 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE); in RewriteObjCBoxedExpr()
2689 castType = Context->getPointerType(castType); in RewriteObjCBoxedExpr()
2690 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast, in RewriteObjCBoxedExpr()
2694 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast); in RewriteObjCBoxedExpr()
2697 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(), in RewriteObjCBoxedExpr()
2718 QualType IntQT = Context->IntTy; in RewriteObjCArrayLiteralExpr()
2720 getSimpleFunctionType(Context->VoidTy, IntQT, true); in RewriteObjCArrayLiteralExpr()
2723 DeclRefExpr *NSArrayDRE = new (Context) DeclRefExpr( in RewriteObjCArrayLiteralExpr()
2724 *Context, NSArrayFD, false, NSArrayFType, VK_PRValue, SourceLocation()); in RewriteObjCArrayLiteralExpr()
2729 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy)); in RewriteObjCArrayLiteralExpr()
2730 Expr *count = IntegerLiteral::Create(*Context, in RewriteObjCArrayLiteralExpr()
2732 Context->UnsignedIntTy, SourceLocation()); in RewriteObjCArrayLiteralExpr()
2737 CallExpr::Create(*Context, NSArrayDRE, InitExprs, NSArrayFType, VK_LValue, in RewriteObjCArrayLiteralExpr()
2740 FieldDecl *ARRFD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in RewriteObjCArrayLiteralExpr()
2742 &Context->Idents.get("arr"), in RewriteObjCArrayLiteralExpr()
2743 Context->getPointerType(Context->VoidPtrTy), in RewriteObjCArrayLiteralExpr()
2747 MemberExpr::CreateImplicit(*Context, NSArrayCallExpr, false, ARRFD, in RewriteObjCArrayLiteralExpr()
2749 QualType ConstIdT = Context->getObjCIdType().withConst(); in RewriteObjCArrayLiteralExpr()
2751 NoTypeInfoCStyleCastExpr(Context, in RewriteObjCArrayLiteralExpr()
2752 Context->getPointerType(ConstIdT), in RewriteObjCArrayLiteralExpr()
2785 Expr *cnt = IntegerLiteral::Create(*Context, in RewriteObjCArrayLiteralExpr()
2787 Context->UnsignedIntTy, SourceLocation()); in RewriteObjCArrayLiteralExpr()
2791 ArgTypes.push_back(Context->getObjCClassType()); in RewriteObjCArrayLiteralExpr()
2792 ArgTypes.push_back(Context->getObjCSelType()); in RewriteObjCArrayLiteralExpr()
2801 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCArrayLiteralExpr()
2802 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation()); in RewriteObjCArrayLiteralExpr()
2805 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE); in RewriteObjCArrayLiteralExpr()
2810 castType = Context->getPointerType(castType); in RewriteObjCArrayLiteralExpr()
2811 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast, in RewriteObjCArrayLiteralExpr()
2815 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast); in RewriteObjCArrayLiteralExpr()
2818 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(), in RewriteObjCArrayLiteralExpr()
2839 QualType IntQT = Context->IntTy; in RewriteObjCDictionaryLiteralExpr()
2841 getSimpleFunctionType(Context->VoidTy, IntQT, true); in RewriteObjCDictionaryLiteralExpr()
2844 DeclRefExpr *NSDictDRE = new (Context) DeclRefExpr( in RewriteObjCDictionaryLiteralExpr()
2845 *Context, NSDictFD, false, NSDictFType, VK_PRValue, SourceLocation()); in RewriteObjCDictionaryLiteralExpr()
2852 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy)); in RewriteObjCDictionaryLiteralExpr()
2853 Expr *count = IntegerLiteral::Create(*Context, in RewriteObjCDictionaryLiteralExpr()
2855 Context->UnsignedIntTy, SourceLocation()); in RewriteObjCDictionaryLiteralExpr()
2866 CallExpr::Create(*Context, NSDictDRE, ValueExprs, NSDictFType, VK_LValue, in RewriteObjCDictionaryLiteralExpr()
2869 FieldDecl *ARRFD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in RewriteObjCDictionaryLiteralExpr()
2871 &Context->Idents.get("arr"), in RewriteObjCDictionaryLiteralExpr()
2872 Context->getPointerType(Context->VoidPtrTy), in RewriteObjCDictionaryLiteralExpr()
2876 MemberExpr::CreateImplicit(*Context, NSValueCallExpr, false, ARRFD, in RewriteObjCDictionaryLiteralExpr()
2878 QualType ConstIdT = Context->getObjCIdType().withConst(); in RewriteObjCDictionaryLiteralExpr()
2880 NoTypeInfoCStyleCastExpr(Context, in RewriteObjCDictionaryLiteralExpr()
2881 Context->getPointerType(ConstIdT), in RewriteObjCDictionaryLiteralExpr()
2886 CallExpr::Create(*Context, NSDictDRE, KeyExprs, NSDictFType, VK_LValue, in RewriteObjCDictionaryLiteralExpr()
2890 MemberExpr::CreateImplicit(*Context, NSKeyCallExpr, false, ARRFD, in RewriteObjCDictionaryLiteralExpr()
2894 NoTypeInfoCStyleCastExpr(Context, in RewriteObjCDictionaryLiteralExpr()
2895 Context->getPointerType(ConstIdT), in RewriteObjCDictionaryLiteralExpr()
2930 Expr *cnt = IntegerLiteral::Create(*Context, in RewriteObjCDictionaryLiteralExpr()
2932 Context->UnsignedIntTy, SourceLocation()); in RewriteObjCDictionaryLiteralExpr()
2936 ArgTypes.push_back(Context->getObjCClassType()); in RewriteObjCDictionaryLiteralExpr()
2937 ArgTypes.push_back(Context->getObjCSelType()); in RewriteObjCDictionaryLiteralExpr()
2943 T = Context->getPointerType(PointeeTy); in RewriteObjCDictionaryLiteralExpr()
2953 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCDictionaryLiteralExpr()
2954 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation()); in RewriteObjCDictionaryLiteralExpr()
2957 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE); in RewriteObjCDictionaryLiteralExpr()
2962 castType = Context->getPointerType(castType); in RewriteObjCDictionaryLiteralExpr()
2963 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast, in RewriteObjCDictionaryLiteralExpr()
2967 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast); in RewriteObjCDictionaryLiteralExpr()
2970 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(), in RewriteObjCDictionaryLiteralExpr()
2982 *Context, TagTypeKind::Struct, TUDecl, SourceLocation(), in getSuperStructType()
2983 SourceLocation(), &Context->Idents.get("__rw_objc_super")); in getSuperStructType()
2987 FieldTypes[0] = Context->getObjCIdType(); in getSuperStructType()
2989 FieldTypes[1] = Context->getObjCIdType(); in getSuperStructType()
2993 SuperStructDecl->addDecl(FieldDecl::Create(*Context, SuperStructDecl, in getSuperStructType()
3004 return Context->getTagDeclType(SuperStructDecl); in getSuperStructType()
3010 *Context, TagTypeKind::Struct, TUDecl, SourceLocation(), in getConstantStringStructType()
3011 SourceLocation(), &Context->Idents.get("__NSConstantStringImpl")); in getConstantStringStructType()
3015 FieldTypes[0] = Context->getObjCIdType(); in getConstantStringStructType()
3017 FieldTypes[1] = Context->IntTy; in getConstantStringStructType()
3019 FieldTypes[2] = Context->getPointerType(Context->CharTy); in getConstantStringStructType()
3021 FieldTypes[3] = Context->LongTy; in getConstantStringStructType()
3025 ConstantStringDecl->addDecl(FieldDecl::Create(*Context, in getConstantStringStructType()
3037 return Context->getTagDeclType(ConstantStringDecl); in getConstantStringStructType()
3103 QualType castType = Context->getPointerType(FuncType); in SynthMsgSendStretCallExpr()
3117 ArgTypes[i].getAsStringInternal(ArgName, Context->getPrintingPolicy()); in SynthMsgSendStretCallExpr()
3124 Context->getPrintingPolicy()); in SynthMsgSendStretCallExpr()
3130 str += returnType.getAsString(Context->getPrintingPolicy()); str += ");\n"; in SynthMsgSendStretCallExpr()
3134 str += "\t s = (("; str += castType.getAsString(Context->getPrintingPolicy()); in SynthMsgSendStretCallExpr()
3149 str += "\t s = (("; str += castType.getAsString(Context->getPrintingPolicy()); in SynthMsgSendStretCallExpr()
3161 str += "\t"; str += returnType.getAsString(Context->getPrintingPolicy()); in SynthMsgSendStretCallExpr()
3176 IdentifierInfo *ID = &Context->Idents.get(name); in SynthMsgSendStretCallExpr()
3178 FunctionDecl::Create(*Context, TUDecl, SourceLocation(), SourceLocation(), in SynthMsgSendStretCallExpr()
3180 DeclRefExpr *DRE = new (Context) in SynthMsgSendStretCallExpr()
3181 DeclRefExpr(*Context, FD, false, castType, VK_PRValue, SourceLocation()); in SynthMsgSendStretCallExpr()
3183 CallExpr::Create(*Context, DRE, MsgExprs, castType, VK_LValue, in SynthMsgSendStretCallExpr()
3186 FieldDecl *FieldD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in SynthMsgSendStretCallExpr()
3188 &Context->Idents.get("s"), in SynthMsgSendStretCallExpr()
3193 *Context, STCE, false, FieldD, FieldD->getType(), VK_LValue, OK_Ordinary); in SynthMsgSendStretCallExpr()
3247 Context, Context->getObjCIdType(), CK_BitCast, in SynthMessageExpr()
3248 new (Context) DeclRefExpr(*Context, CurMethodDef->getSelfDecl(), false, in SynthMessageExpr()
3249 Context->getObjCIdType(), VK_PRValue, in SynthMessageExpr()
3266 NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
3267 Context->getObjCIdType(), in SynthMessageExpr()
3276 DeclRefExpr *DRE = new (Context) in SynthMessageExpr()
3277 DeclRefExpr(*Context, SuperConstructorFunctionDecl, false, superType, in SynthMessageExpr()
3280 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr()
3289 const_cast<ASTContext &>(*Context), SuperRep, UO_AddrOf, in SynthMessageExpr()
3290 Context->getPointerType(SuperRep->getType()), VK_PRValue, OK_Ordinary, in SynthMessageExpr()
3292 SuperRep = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
3293 Context->getPointerType(superType), in SynthMessageExpr()
3298 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs, in SynthMessageExpr()
3301 = Context->getTrivialTypeSourceInfo(superType); in SynthMessageExpr()
3302 SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), superTInfo, in SynthMessageExpr()
3307 const_cast<ASTContext &>(*Context), SuperRep, UO_AddrOf, in SynthMessageExpr()
3308 Context->getPointerType(SuperRep->getType()), VK_PRValue, OK_Ordinary, in SynthMessageExpr()
3323 CastExpr *ArgExpr = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
3324 Context->getObjCIdType(), in SynthMessageExpr()
3339 Context, Context->getObjCIdType(), CK_BitCast, in SynthMessageExpr()
3340 new (Context) DeclRefExpr(*Context, CurMethodDef->getSelfDecl(), false, in SynthMessageExpr()
3341 Context->getObjCIdType(), VK_PRValue, in SynthMessageExpr()
3359 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
3368 DeclRefExpr *DRE = new (Context) in SynthMessageExpr()
3369 DeclRefExpr(*Context, SuperConstructorFunctionDecl, false, superType, in SynthMessageExpr()
3372 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr()
3381 const_cast<ASTContext &>(*Context), SuperRep, UO_AddrOf, in SynthMessageExpr()
3382 Context->getPointerType(SuperRep->getType()), VK_PRValue, OK_Ordinary, in SynthMessageExpr()
3384 SuperRep = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
3385 Context->getPointerType(superType), in SynthMessageExpr()
3390 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs, in SynthMessageExpr()
3393 = Context->getTrivialTypeSourceInfo(superType); in SynthMessageExpr()
3394 SuperRep = new (Context) CompoundLiteralExpr( in SynthMessageExpr()
3412 recExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
3434 type = Context->getObjCIdType(); in SynthMessageExpr()
3439 if (SubExpr->getType()->isIntegralType(*Context) && in SynthMessageExpr()
3454 userExpr = NoTypeInfoCStyleCastExpr(Context, type, CK, userExpr); in SynthMessageExpr()
3462 if (userExpr->getType()->isIntegralType(*Context)) { in SynthMessageExpr()
3471 userExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(), in SynthMessageExpr()
3488 ArgTypes.push_back(Context->getPointerType(getSuperStructType())); in SynthMessageExpr()
3490 ArgTypes.push_back(Context->getObjCIdType()); in SynthMessageExpr()
3491 ArgTypes.push_back(Context->getObjCSelType()); in SynthMessageExpr()
3496 ? Context->getObjCIdType() in SynthMessageExpr()
3506 returnType = Context->getObjCIdType(); in SynthMessageExpr()
3512 DeclRefExpr *DRE = new (Context) DeclRefExpr( in SynthMessageExpr()
3513 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation()); in SynthMessageExpr()
3519 cast = NoTypeInfoCStyleCastExpr(Context, in SynthMessageExpr()
3520 Context->getPointerType(Context->VoidTy), in SynthMessageExpr()
3528 castType = Context->getPointerType(castType); in SynthMessageExpr()
3529 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast, in SynthMessageExpr()
3533 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast); in SynthMessageExpr()
3536 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(), in SynthMessageExpr()
3570 = Context->getTrivialTypeSourceInfo(Context->getObjCIdType()); in getProtocolType()
3571 ProtocolTypeDecl = TypedefDecl::Create(*Context, TUDecl, in getProtocolType()
3573 &Context->Idents.get("Protocol"), in getProtocolType()
3576 return Context->getTypeDeclType(ProtocolTypeDecl); in getProtocolType()
3586 IdentifierInfo *ID = &Context->Idents.get(Name); in RewriteObjCProtocolExpr()
3587 VarDecl *VD = VarDecl::Create(*Context, TUDecl, SourceLocation(), in RewriteObjCProtocolExpr()
3590 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCProtocolExpr()
3591 *Context, VD, false, getProtocolType(), VK_LValue, SourceLocation()); in RewriteObjCProtocolExpr()
3593 Context, Context->getPointerType(DRE->getType()), CK_BitCast, DRE); in RewriteObjCProtocolExpr()
3614 return Context->getSourceManager().isBeforeInTranslationUnit( in IsTagDefinedInsideClass()
3622 return Context->getSourceManager().isBeforeInTranslationUnit( in IsTagDefinedInsideClass()
3638 QualType ElemTy = Context->getBaseElementType(Type); in RewriteObjCFieldDeclType()
3701 Type.getAsStringInternal(Name, Context->getPrintingPolicy()); in RewriteObjCFieldDecl()
3704 Result += " : "; Result += utostr(fieldDecl->getBitWidthValue(*Context)); in RewriteObjCFieldDecl()
3707 const ArrayType *AT = Context->getAsArrayType(Type); in RewriteObjCFieldDecl()
3715 AT = Context->getAsArrayType(AT->getElementType()); in RewriteObjCFieldDecl()
3730 Type = Context->getBaseElementType(Type); in RewriteLocallyDefinedNamedAggregates()
3786 *Context, TagTypeKind::Struct, Context->getTranslationUnitDecl(), in SynthesizeBitfieldGroupStructType()
3787 SourceLocation(), SourceLocation(), &Context->Idents.get(StructTagName)); in SynthesizeBitfieldGroupStructType()
3790 RD->addDecl(FieldDecl::Create(*Context, RD, SourceLocation(), SourceLocation(), in SynthesizeBitfieldGroupStructType()
3791 &Context->Idents.get(Ivar->getName()), in SynthesizeBitfieldGroupStructType()
3797 return Context->getTagDeclType(RD); in SynthesizeBitfieldGroupStructType()
4048 S += "static " + RT.getAsString(Context->getPrintingPolicy()) + " __" + in SynthesizeBlockFunc()
4072 QT.getAsStringInternal(ParamStr, Context->getPrintingPolicy()); in SynthesizeBlockFunc()
4120 QT = Context->getPointerType(QT); in SynthesizeBlockFunc()
4121 QT.getAsStringInternal(Name, Context->getPrintingPolicy()); in SynthesizeBlockFunc()
4214 QT = Context->getPointerType(QT); in SynthesizeBlockImpl()
4215 QT.getAsStringInternal(FieldName, Context->getPrintingPolicy()); in SynthesizeBlockImpl()
4216 QT.getAsStringInternal(ArgName, Context->getPrintingPolicy()); in SynthesizeBlockImpl()
4514 T = Context->getPointerType(T); in convertObjCTypeToCStyleType()
4572 ConditionalOperator *CondExpr = new (Context) ConditionalOperator( in SynthesizeBlockCall()
4590 RecordDecl *RD = RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in SynthesizeBlockCall()
4592 &Context->Idents.get("__block_impl")); in SynthesizeBlockCall()
4593 QualType PtrBlock = Context->getPointerType(Context->getTagDeclType(RD)); in SynthesizeBlockCall()
4612 PtrToFuncCastType = Context->getPointerType(PtrToFuncCastType); in SynthesizeBlockCall()
4614 CastExpr *BlkCast = NoTypeInfoCStyleCastExpr(Context, PtrBlock, in SynthesizeBlockCall()
4618 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in SynthesizeBlockCall()
4622 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in SynthesizeBlockCall()
4624 &Context->Idents.get("FuncPtr"), in SynthesizeBlockCall()
4625 Context->VoidPtrTy, nullptr, in SynthesizeBlockCall()
4629 *Context, PE, true, FD, FD->getType(), VK_LValue, OK_Ordinary); in SynthesizeBlockCall()
4631 CastExpr *FunkCast = NoTypeInfoCStyleCastExpr(Context, PtrToFuncCastType, in SynthesizeBlockCall()
4633 PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), FunkCast); in SynthesizeBlockCall()
4644 CallExpr::Create(*Context, PE, BlkExprs, Exp->getType(), VK_PRValue, in SynthesizeBlockCall()
4669 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in RewriteBlockDeclRefExpr()
4671 &Context->Idents.get("__forwarding"), in RewriteBlockDeclRefExpr()
4672 Context->VoidPtrTy, nullptr, in RewriteBlockDeclRefExpr()
4676 *Context, DeclRefExp, isArrow, FD, FD->getType(), VK_LValue, OK_Ordinary); in RewriteBlockDeclRefExpr()
4679 FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), SourceLocation(), in RewriteBlockDeclRefExpr()
4680 &Context->Idents.get(Name), in RewriteBlockDeclRefExpr()
4681 Context->VoidPtrTy, nullptr, in RewriteBlockDeclRefExpr()
4684 ME = MemberExpr::CreateImplicit(*Context, ME, true, FD, DeclRefExp->getType(), in RewriteBlockDeclRefExpr()
4688 ParenExpr *PE = new (Context) ParenExpr(DeclRefExp->getExprLoc(), in RewriteBlockDeclRefExpr()
4704 const_cast<ASTContext &>(*Context), DRE, UO_Deref, DRE->getType(), in RewriteLocalVariableExternalStorage()
4707 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in RewriteLocalVariableExternalStorage()
4759 std::string TypeString(QT.getAsString(Context->getPrintingPolicy())); in RewriteImplicitCastObjCExpr()
4969 static_cast<unsigned>(Context->getTypeSize(Context->IntTy)); in SynthesizeByrefCopyDestroyHelper()
4971 static_cast<unsigned>(Context->getTypeSize(Context->VoidPtrTy)); in SynthesizeByrefCopyDestroyHelper()
4973 unsigned offset = (VoidPtrSize*4 + IntSize + IntSize)/Context->getCharWidth(); in SynthesizeByrefCopyDestroyHelper()
5036 bool HasCopyAndDispose = Context->BlockRequiresCopying(Ty, ND); in RewriteByRefVar()
5044 T.getAsStringInternal(Name, Context->getPrintingPolicy()); in RewriteByRefVar()
5188 IdentifierInfo *ID = &Context->Idents.get(name); in SynthBlockInitFunctionDecl()
5189 QualType FType = Context->getFunctionNoProtoType(Context->VoidPtrTy); in SynthBlockInitFunctionDecl()
5190 return FunctionDecl::Create(*Context, TUDecl, SourceLocation(), in SynthBlockInitFunctionDecl()
5257 QualType FType = Context->getPointerType(BFT); in SynthBlockInitExpr()
5272 DeclRefExpr *DRE = new (Context) in SynthBlockInitExpr()
5273 DeclRefExpr(*Context, FD, false, FType, VK_PRValue, SourceLocation()); in SynthBlockInitExpr()
5279 DeclRefExpr *Arg = new (Context) DeclRefExpr( in SynthBlockInitExpr()
5280 *Context, FD, false, FD->getType(), VK_LValue, SourceLocation()); in SynthBlockInitExpr()
5281 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy, in SynthBlockInitExpr()
5289 *Context, TUDecl, SourceLocation(), SourceLocation(), in SynthBlockInitExpr()
5290 &Context->Idents.get(DescData), Context->VoidPtrTy, nullptr, SC_Static); in SynthBlockInitExpr()
5292 const_cast<ASTContext &>(*Context), in SynthBlockInitExpr()
5293 new (Context) DeclRefExpr(*Context, NewVD, false, Context->VoidPtrTy, in SynthBlockInitExpr()
5295 UO_AddrOf, Context->getPointerType(Context->VoidPtrTy), VK_PRValue, in SynthBlockInitExpr()
5308 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
5312 QT = Context->getPointerType(QT); in SynthBlockInitExpr()
5313 Exp = UnaryOperator::Create(const_cast<ASTContext &>(*Context), Exp, in SynthBlockInitExpr()
5320 Arg = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
5322 Exp = NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy, in SynthBlockInitExpr()
5326 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
5330 QT = Context->getPointerType(QT); in SynthBlockInitExpr()
5331 Exp = UnaryOperator::Create(const_cast<ASTContext &>(*Context), Exp, in SynthBlockInitExpr()
5347 IdentifierInfo *II = &Context->Idents.get(RecName.c_str() in SynthBlockInitExpr()
5350 RecordDecl::Create(*Context, TagTypeKind::Struct, TUDecl, in SynthBlockInitExpr()
5353 QualType castT = Context->getPointerType(Context->getTagDeclType(RD)); in SynthBlockInitExpr()
5356 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(), in SynthBlockInitExpr()
5372 const_cast<ASTContext &>(*Context), Exp, UO_AddrOf, in SynthBlockInitExpr()
5373 Context->getPointerType(Exp->getType()), VK_PRValue, OK_Ordinary, in SynthBlockInitExpr()
5375 Exp = NoTypeInfoCStyleCastExpr(Context, castT, CK_BitCast, Exp); in SynthBlockInitExpr()
5383 static_cast<unsigned>(Context->getTypeSize(Context->IntTy)); in SynthBlockInitExpr()
5384 Expr *FlagExp = IntegerLiteral::Create(*Context, llvm::APInt(IntSize, flag), in SynthBlockInitExpr()
5385 Context->IntTy, SourceLocation()); in SynthBlockInitExpr()
5388 NewRep = CallExpr::Create(*Context, DRE, InitExprs, FType, VK_LValue, in SynthBlockInitExpr()
5399 const_cast<ASTContext &>(*Context), NewRep, UO_AddrOf, in SynthBlockInitExpr()
5400 Context->getPointerType(NewRep->getType()), VK_PRValue, OK_Ordinary, in SynthBlockInitExpr()
5402 NewRep = NoTypeInfoCStyleCastExpr(Context, FType, CK_BitCast, in SynthBlockInitExpr()
5405 NewRep = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in SynthBlockInitExpr()
5650 CastExpr *Replacement = new (Context) CastExpr(ICE->getType(), in RewriteFunctionBodyOrGlobalInitializer()
5809 static void Write_ProtocolExprReferencedMetadata(ASTContext *Context, in Write_ProtocolExprReferencedMetadata() argument
5813 if (Context->getLangOpts().MicrosoftExt) in Write_ProtocolExprReferencedMetadata()
5841 Write_ProtocolExprReferencedMetadata(Context, ProtDecl, Preamble); in HandleTranslationUnit()
6175 static void WriteModernMetadataDeclarations(ASTContext *Context, std::string &Result) { in WriteModernMetadataDeclarations() argument
6219 const llvm::Triple &Triple(Context->getTargetInfo().getTriple()); in WriteModernMetadataDeclarations()
6292 static void Write_protocol_list_initializer(ASTContext *Context, std::string &Result, in Write_protocol_list_initializer() argument
6316 ASTContext *Context, std::string &Result, in Write_method_list_t_initializer() argument
6337 std::string MethodTypeString = Context->getObjCEncodingForMethodDecl(MD); in Write_method_list_t_initializer()
6356 ASTContext *Context, std::string &Result, in Write_prop_list_t_initializer() argument
6377 Context->getObjCEncodingForPropertyDecl(PropDecl, Container); in Write_prop_list_t_initializer()
6404 static void Write__class_ro_t_initializer(ASTContext *Context, std::string &Result, in Write__class_ro_t_initializer() argument
6422 const llvm::Triple &Triple(Context->getTargetInfo().getTriple()); in Write__class_ro_t_initializer()
6471 static void Write_class_t(ASTContext *Context, std::string &Result, in Write_class_t() argument
6611 static void Write_category_t(RewriteModernObjC &RewriteObj, ASTContext *Context, in Write_category_t() argument
6694 ASTContext *Context, std::string &Result, in Write__extendedMethodTypes_initializer() argument
6708 Context->getObjCEncodingForMethodDecl(MD, true); in Write__extendedMethodTypes_initializer()
6721 ASTContext *Context, in Write_IvarOffsetVar() argument
6739 if (Context->getLangOpts().MicrosoftExt) in Write_IvarOffsetVar()
6742 if (!Context->getLangOpts().MicrosoftExt || in Write_IvarOffsetVar()
6764 ASTContext *Context, std::string &Result, in Write__ivar_list_t_initializer() argument
6769 Write_IvarOffsetVar(RewriteObj, Context, Result, OriginalIvars, CDecl); in Write__ivar_list_t_initializer()
6816 Context->getObjCEncodingForType(IVQT, IvarTypeString, in Write__ivar_list_t_initializer()
6823 unsigned Align = Context->getTypeAlign(IVQT)/8; in Write__ivar_list_t_initializer()
6826 CharUnits Size = Context->getTypeSizeInChars(IVQT); in Write__ivar_list_t_initializer()
6844 WriteModernMetadataDeclarations(Context, Result); in RewriteObjCProtocolMetaData()
6881 Write__extendedMethodTypes_initializer(*this, Context, Result, in RewriteObjCProtocolMetaData()
6887 Write_protocol_list_initializer(Context, Result, SuperProtocols, in RewriteObjCProtocolMetaData()
6891 Write_method_list_t_initializer(*this, Context, Result, InstanceMethods, in RewriteObjCProtocolMetaData()
6895 Write_method_list_t_initializer(*this, Context, Result, ClassMethods, in RewriteObjCProtocolMetaData()
6899 Write_method_list_t_initializer(*this, Context, Result, OptInstanceMethods, in RewriteObjCProtocolMetaData()
6903 Write_method_list_t_initializer(*this, Context, Result, OptClassMethods, in RewriteObjCProtocolMetaData()
6910 Write_prop_list_t_initializer(*this, Context, Result, ProtocolProperties, in RewriteObjCProtocolMetaData()
6991 static bool hasObjCExceptionAttribute(ASTContext &Context, in hasObjCExceptionAttribute() argument
6996 return hasObjCExceptionAttribute(Context, Super); in hasObjCExceptionAttribute()
7009 WriteModernMetadataDeclarations(Context, Result); in RewriteObjCClassMetaData()
7020 Write__ivar_list_t_initializer(*this, Context, Result, IVars, in RewriteObjCClassMetaData()
7047 Write_method_list_t_initializer(*this, Context, Result, InstanceMethods, in RewriteObjCClassMetaData()
7053 Write_method_list_t_initializer(*this, Context, Result, ClassMethods, in RewriteObjCClassMetaData()
7070 Write_protocol_list_initializer(Context, Result, in RewriteObjCClassMetaData()
7078 Write_prop_list_t_initializer(*this, Context, Result, ClassProperties, in RewriteObjCClassMetaData()
7097 Write__class_ro_t_initializer(Context, Result, flags, in RewriteObjCClassMetaData()
7111 if (hasObjCExceptionAttribute(*Context, CDecl)) in RewriteObjCClassMetaData()
7136 Write__class_ro_t_initializer(Context, Result, flags, in RewriteObjCClassMetaData()
7145 Write_class_t(Context, Result, in RewriteObjCClassMetaData()
7149 Write_class_t(Context, Result, in RewriteObjCClassMetaData()
7264 WriteModernMetadataDeclarations(Context, Result); in RewriteObjCCategoryImplDecl()
7295 Write_method_list_t_initializer(*this, Context, Result, InstanceMethods, in RewriteObjCCategoryImplDecl()
7301 Write_method_list_t_initializer(*this, Context, Result, ClassMethods, in RewriteObjCCategoryImplDecl()
7313 Write_protocol_list_initializer(Context, Result, in RewriteObjCCategoryImplDecl()
7321 Write_prop_list_t_initializer(*this, Context, Result, ClassProperties, in RewriteObjCCategoryImplDecl()
7326 Write_category_t(*this, Context, Result, in RewriteObjCCategoryImplDecl()
7420 Context->getObjCEncodingForMethodDecl(*MethodBegin, MethodTypeString); in RewriteObjCMethodsMetaData()
7430 Context->getObjCEncodingForMethodDecl(*MethodBegin, MethodTypeString); in RewriteObjCMethodsMetaData()
7475 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, in RewriteObjCIvarRefExpr()
7476 Context->getPointerType(Context->CharTy), in RewriteObjCIvarRefExpr()
7479 VarDecl *NewVD = VarDecl::Create(*Context, TUDecl, SourceLocation(), in RewriteObjCIvarRefExpr()
7480 SourceLocation(), &Context->Idents.get(IvarOffsetName), in RewriteObjCIvarRefExpr()
7481 Context->UnsignedLongTy, nullptr, in RewriteObjCIvarRefExpr()
7483 DeclRefExpr *DRE = new (Context) in RewriteObjCIvarRefExpr()
7484 DeclRefExpr(*Context, NewVD, false, Context->UnsignedLongTy, in RewriteObjCIvarRefExpr()
7487 *Context, castExpr, DRE, BO_Add, in RewriteObjCIvarRefExpr()
7488 Context->getPointerType(Context->CharTy), VK_PRValue, OK_Ordinary, in RewriteObjCIvarRefExpr()
7491 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), in RewriteObjCIvarRefExpr()
7510 *Context, TagTypeKind::Struct, TUDecl, SourceLocation(), in RewriteObjCIvarRefExpr()
7511 SourceLocation(), &Context->Idents.get(RecName)); in RewriteObjCIvarRefExpr()
7512 QualType PtrStructIMPL = Context->getPointerType(Context->getTagDeclType(RD)); in RewriteObjCIvarRefExpr()
7514 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy)); in RewriteObjCIvarRefExpr()
7515 Expr *Zero = IntegerLiteral::Create(*Context, in RewriteObjCIvarRefExpr()
7517 Context->UnsignedIntTy, SourceLocation()); in RewriteObjCIvarRefExpr()
7518 Zero = NoTypeInfoCStyleCastExpr(Context, PtrStructIMPL, CK_BitCast, Zero); in RewriteObjCIvarRefExpr()
7519 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), in RewriteObjCIvarRefExpr()
7521 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in RewriteObjCIvarRefExpr()
7523 &Context->Idents.get(D->getNameAsString()), in RewriteObjCIvarRefExpr()
7528 *Context, PE, true, FD, FD->getType(), VK_LValue, OK_Ordinary); in RewriteObjCIvarRefExpr()
7529 IvarT = Context->getDecltypeType(ME, ME->getType()); in RewriteObjCIvarRefExpr()
7533 QualType castT = Context->getPointerType(IvarT); in RewriteObjCIvarRefExpr()
7535 castExpr = NoTypeInfoCStyleCastExpr(Context, in RewriteObjCIvarRefExpr()
7541 const_cast<ASTContext &>(*Context), castExpr, UO_Deref, IvarT, in RewriteObjCIvarRefExpr()
7543 PE = new (Context) ParenExpr(OldRange.getBegin(), in RewriteObjCIvarRefExpr()
7548 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), in RewriteObjCIvarRefExpr()
7550 &Context->Idents.get(D->getNameAsString()), in RewriteObjCIvarRefExpr()
7555 MemberExpr::CreateImplicit(*Context, PE, /*isArrow*/ false, FD, in RewriteObjCIvarRefExpr()