Lines Matching refs:Exp
349 Stmt *RewriteAtEncode(ObjCEncodeExpr *Exp);
352 Stmt *RewriteAtSelector(ObjCSelectorExpr *Exp);
353 Stmt *RewriteMessageExpr(ObjCMessageExpr *Exp);
354 Stmt *RewriteObjCStringLiteral(ObjCStringLiteral *Exp);
355 Stmt *RewriteObjCBoolLiteralExpr(ObjCBoolLiteralExpr *Exp);
356 Stmt *RewriteObjCBoxedExpr(ObjCBoxedExpr *Exp);
357 Stmt *RewriteObjCArrayLiteralExpr(ObjCArrayLiteral *Exp);
358 Stmt *RewriteObjCDictionaryLiteralExpr(ObjCDictionaryLiteral *Exp);
359 Stmt *RewriteObjCProtocolExpr(ObjCProtocolExpr *Exp);
425 Stmt *SynthMessageExpr(ObjCMessageExpr *Exp,
481 Stmt *SynthesizeBlockCall(CallExpr *Exp, const Expr* BlockExp);
485 Stmt *SynthBlockInitExpr(BlockExpr *Exp,
496 void CollectBlockDeclRefInfo(BlockExpr *Exp);
2088 Stmt *RewriteModernObjC::RewriteAtEncode(ObjCEncodeExpr *Exp) { in RewriteAtEncode() argument
2091 Context->getObjCEncodingForType(Exp->getEncodedType(), StrEncoding); in RewriteAtEncode()
2093 ReplaceStmt(Exp, Replacement); in RewriteAtEncode()
2100 Stmt *RewriteModernObjC::RewriteAtSelector(ObjCSelectorExpr *Exp) { in RewriteAtSelector() argument
2106 SelExprs.push_back(getStringLiteral(Exp->getSelector().getAsString())); in RewriteAtSelector()
2109 ReplaceStmt(Exp, SelExp); in RewriteAtSelector()
2134 CallExpr *Exp = new (Context) CallExpr(*Context, ICE, Args, in SynthesizeCallToFunctionDecl() local
2137 return Exp; in SynthesizeCallToFunctionDecl()
2579 Stmt *RewriteModernObjC::RewriteObjCStringLiteral(ObjCStringLiteral *Exp) { in RewriteObjCStringLiteral() argument
2580 assert (Exp != nullptr && "Expected non-null ObjCStringLiteral"); in RewriteObjCStringLiteral()
2603 Exp->getString()->printPretty(prettyBuf, nullptr, PrintingPolicy(LangOpts)); in RewriteObjCStringLiteral()
2606 Preamble += utostr(Exp->getString()->getByteLength()) + "};\n"; in RewriteObjCStringLiteral()
2618 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, Exp->getType(), in RewriteObjCStringLiteral()
2620 ReplaceStmt(Exp, cast); in RewriteObjCStringLiteral()
2625 Stmt *RewriteModernObjC::RewriteObjCBoolLiteralExpr(ObjCBoolLiteralExpr *Exp) { in RewriteObjCBoolLiteralExpr() argument
2630 llvm::APInt(IntSize, Exp->getValue()), in RewriteObjCBoolLiteralExpr()
2631 Context->IntTy, Exp->getLocation()); in RewriteObjCBoolLiteralExpr()
2634 ParenExpr *PE = new (Context) ParenExpr(Exp->getLocation(), Exp->getExprLoc(), in RewriteObjCBoolLiteralExpr()
2636 ReplaceStmt(Exp, PE); in RewriteObjCBoolLiteralExpr()
2640 Stmt *RewriteModernObjC::RewriteObjCBoxedExpr(ObjCBoxedExpr *Exp) { in RewriteObjCBoxedExpr() argument
2651 SourceLocation StartLoc = Exp->getLocStart(); in RewriteObjCBoxedExpr()
2652 SourceLocation EndLoc = Exp->getLocEnd(); in RewriteObjCBoxedExpr()
2659 ObjCMethodDecl *BoxingMethod = Exp->getBoxingMethod(); in RewriteObjCBoxedExpr()
2678 Expr *subExpr = Exp->getSubExpr(); in RewriteObjCBoxedExpr()
2695 QualType returnType = Exp->getType(); in RewriteObjCBoxedExpr()
2720 ReplaceStmt(Exp, CE); in RewriteObjCBoxedExpr()
2724 Stmt *RewriteModernObjC::RewriteObjCArrayLiteralExpr(ObjCArrayLiteral *Exp) { in RewriteObjCArrayLiteralExpr() argument
2735 SourceLocation StartLoc = Exp->getLocStart(); in RewriteObjCArrayLiteralExpr()
2736 SourceLocation EndLoc = Exp->getLocEnd(); in RewriteObjCArrayLiteralExpr()
2749 unsigned NumElements = Exp->getNumElements(); in RewriteObjCArrayLiteralExpr()
2757 InitExprs.push_back(Exp->getElement(i)); in RewriteObjCArrayLiteralExpr()
2781 QualType expType = Exp->getType(); in RewriteObjCArrayLiteralExpr()
2796 ObjCMethodDecl *ArrayMethod = Exp->getArrayWithObjectsMethod(); in RewriteObjCArrayLiteralExpr()
2819 QualType returnType = Exp->getType(); in RewriteObjCArrayLiteralExpr()
2844 ReplaceStmt(Exp, CE); in RewriteObjCArrayLiteralExpr()
2848 Stmt *RewriteModernObjC::RewriteObjCDictionaryLiteralExpr(ObjCDictionaryLiteral *Exp) { in RewriteObjCDictionaryLiteralExpr() argument
2859 SourceLocation StartLoc = Exp->getLocStart(); in RewriteObjCDictionaryLiteralExpr()
2860 SourceLocation EndLoc = Exp->getLocEnd(); in RewriteObjCDictionaryLiteralExpr()
2875 unsigned NumElements = Exp->getNumElements(); in RewriteObjCDictionaryLiteralExpr()
2884 ObjCDictionaryElement Element = Exp->getKeyValueElement(i); in RewriteObjCDictionaryLiteralExpr()
2929 QualType expType = Exp->getType(); in RewriteObjCDictionaryLiteralExpr()
2944 ObjCMethodDecl *DictMethod = Exp->getDictWithObjectsMethod(); in RewriteObjCDictionaryLiteralExpr()
2976 QualType returnType = Exp->getType(); in RewriteObjCDictionaryLiteralExpr()
3001 ReplaceStmt(Exp, CE); in RewriteObjCDictionaryLiteralExpr()
3230 Stmt *RewriteModernObjC::SynthMessageExpr(ObjCMessageExpr *Exp, in SynthMessageExpr() argument
3256 if (ObjCMethodDecl *mDecl = Exp->getMethodDecl()) { in SynthMessageExpr()
3266 switch (Exp->getReceiverKind()) { in SynthMessageExpr()
3354 = Exp->getClassReceiver()->getAs<ObjCObjectType>()->getInterface(); in SynthMessageExpr()
3443 Expr *recExpr = Exp->getInstanceReceiver(); in SynthMessageExpr()
3460 SelExprs.push_back(getStringLiteral(Exp->getSelector().getAsString())); in SynthMessageExpr()
3466 for (unsigned i = 0; i < Exp->getNumArgs(); i++) { in SynthMessageExpr()
3467 Expr *userExpr = Exp->getArg(i); in SynthMessageExpr()
3531 if (ObjCMethodDecl *OMD = Exp->getMethodDecl()) { in SynthMessageExpr()
3541 returnType = Exp->getType(); in SynthMessageExpr()
3564 const ObjCMethodDecl *MD = Exp->getMethodDecl(); in SynthMessageExpr()
3587 Exp->getMethodDecl()); in SynthMessageExpr()
3594 Stmt *RewriteModernObjC::RewriteMessageExpr(ObjCMessageExpr *Exp) { in RewriteMessageExpr() argument
3595 Stmt *ReplacingStmt = SynthMessageExpr(Exp, Exp->getLocStart(), in RewriteMessageExpr()
3596 Exp->getLocEnd()); in RewriteMessageExpr()
3599 ReplaceStmt(Exp, ReplacingStmt); in RewriteMessageExpr()
3622 Stmt *RewriteModernObjC::RewriteObjCProtocolExpr(ObjCProtocolExpr *Exp) { in RewriteObjCProtocolExpr() argument
3624 Exp->getProtocol()->getNameAsString(); in RewriteObjCProtocolExpr()
3634 ReplaceStmt(Exp, castExpr); in RewriteObjCProtocolExpr()
3635 ProtocolExprDecls.insert(Exp->getProtocol()->getCanonicalDecl()); in RewriteObjCProtocolExpr()
4413 DeclRefExpr *Exp = InnerDeclRefs[count++]; in SynthesizeBlockLiterals() local
4414 ValueDecl *VD = Exp->getDecl(); in SynthesizeBlockLiterals()
4415 BlockDeclRefs.push_back(Exp); in SynthesizeBlockLiterals()
4628 Stmt *RewriteModernObjC::SynthesizeBlockCall(CallExpr *Exp, const Expr *BlockExp) { in SynthesizeBlockCall() argument
4638 return SynthesizeBlockCall(Exp, PRE->getSubExpr()); in SynthesizeBlockCall()
4645 Stmt *LHSStmt = SynthesizeBlockCall(Exp, LHSExp); in SynthesizeBlockCall()
4647 Stmt *RHSStmt = SynthesizeBlockCall(Exp, RHSExp); in SynthesizeBlockCall()
4653 Exp->getType(), VK_RValue, OK_Ordinary); in SynthesizeBlockCall()
4689 QualType PtrToFuncCastType = getSimpleFunctionType(Exp->getType(), ArgTypes); in SynthesizeBlockCall()
4719 for (CallExpr::arg_iterator I = Exp->arg_begin(), in SynthesizeBlockCall()
4720 E = Exp->arg_end(); I != E; ++I) { in SynthesizeBlockCall()
4724 Exp->getType(), VK_RValue, in SynthesizeBlockCall()
4785 Expr *Exp = new (Context) UnaryOperator(DRE, UO_Deref, DRE->getType(), in RewriteLocalVariableExternalStorage() local
4790 Exp); in RewriteLocalVariableExternalStorage()
5248 void RewriteModernObjC::CollectBlockDeclRefInfo(BlockExpr *Exp) { in CollectBlockDeclRefInfo() argument
5250 GetBlockDeclRefExprs(Exp->getBody()); in CollectBlockDeclRefInfo()
5285 Stmt *RewriteModernObjC::SynthBlockInitExpr(BlockExpr *Exp, in SynthBlockInitExpr() argument
5288 const BlockDecl *block = Exp->getBlockDecl(); in SynthBlockInitExpr()
5290 Blocks.push_back(Exp); in SynthBlockInitExpr()
5292 CollectBlockDeclRefInfo(Exp); in SynthBlockInitExpr()
5298 DeclRefExpr *Exp = InnerBlockDeclRefs[i]; in SynthBlockInitExpr() local
5299 ValueDecl *VD = Exp->getDecl(); in SynthBlockInitExpr()
5304 InnerDeclRefs.push_back(Exp); countOfInnerDecls++; in SynthBlockInitExpr()
5305 BlockDeclRefs.push_back(Exp); in SynthBlockInitExpr()
5310 InnerDeclRefs.push_back(Exp); countOfInnerDecls++; in SynthBlockInitExpr()
5311 BlockDeclRefs.push_back(Exp); in SynthBlockInitExpr()
5347 QualType BFT = convertFunctionTypeOfBlocks(Exp->getFunctionType()); in SynthBlockInitExpr()
5397 Expr *Exp; in SynthBlockInitExpr() local
5404 Exp = new (Context) DeclRefExpr(FD, false, FD->getType(), in SynthBlockInitExpr()
5409 Exp = new (Context) UnaryOperator(Exp, UO_AddrOf, QT, VK_RValue, in SynthBlockInitExpr()
5416 Exp = NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy, in SynthBlockInitExpr()
5420 Exp = new (Context) DeclRefExpr(FD, false, FD->getType(), in SynthBlockInitExpr()
5425 Exp = new (Context) UnaryOperator(Exp, UO_AddrOf, QT, VK_RValue, in SynthBlockInitExpr()
5430 InitExprs.push_back(Exp); in SynthBlockInitExpr()
5448 Exp = new (Context) DeclRefExpr(FD, false, FD->getType(), VK_LValue, in SynthBlockInitExpr()
5464 Exp = new (Context) UnaryOperator(Exp, UO_AddrOf, in SynthBlockInitExpr()
5465 Context->getPointerType(Exp->getType()), in SynthBlockInitExpr()
5467 Exp = NoTypeInfoCStyleCastExpr(Context, castT, CK_BitCast, Exp); in SynthBlockInitExpr()
5468 InitExprs.push_back(Exp); in SynthBlockInitExpr()
7680 Expr *Exp = new (Context) UnaryOperator(castExpr, UO_Deref, IvarT, in RewriteObjCIvarRefExpr() local
7685 Exp); in RewriteObjCIvarRefExpr()