Home | History | Annotate | Download | only in Rewrite

Lines Matching refs:FD

336     void RewriteFunctionDecl(FunctionDecl *FD);
339 void RewriteBlockLiteralFunctionDecl(FunctionDecl *FD);
392 void RewriteBlockPointerFunctionArgs(FunctionDecl *FD);
412 CallExpr *SynthesizeCallToFunctionDecl(FunctionDecl *FD,
487 void InsertBlockLiteralsWithinFunction(FunctionDecl *FD);
726 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
727 RewriteFunctionDecl(FD);
875 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
882 MemberExpr(PE, true, SourceLocation(), FD, SourceLocation(),
883 FD->getType(), VK_LValue, OK_Ordinary);
2088 RewriteModernObjC::SynthesizeCallToFunctionDecl(FunctionDecl *FD,
2093 QualType msgSendType = FD->getType();
2097 new (Context) DeclRefExpr(FD, false, msgSendType, VK_LValue, SourceLocation());
2198 else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Dcl)) {
2199 Loc = FD->getLocation();
2202 const FunctionType *funcType = FD->getType()->getAs<FunctionType>();
2209 else if (FieldDecl *FD = dyn_cast<FieldDecl>(Dcl)) {
2210 Loc = FD->getLocation();
2211 Type = FD->getType();
2322 void RewriteModernObjC::RewriteFunctionDecl(FunctionDecl *FD) {
2324 if (FD->getIdentifier() &&
2325 FD->getName() == "sel_registerName") {
2326 SelGetUidFunctionDecl = FD;
2329 RewriteObjCQualifiedInterfaceTypes(FD);
2375 void RewriteModernObjC::RewriteBlockLiteralFunctionDecl(FunctionDecl *FD) {
2376 SourceLocation FunLocStart = FD->getTypeSpecStartLoc();
2377 const FunctionType *funcType = FD->getType()->getAs<FunctionType>();
2384 FdStr += FD->getName();
2393 if (FD->isVariadic()) {
3042 FunctionDecl *FD) {
3043 if (FD->isExternC() && !FD->isMain()) {
3044 const DeclContext *DC = FD->getDeclContext();
3050 if (FD->getStorageClass() != SC_None)
3051 R.RewriteBlockLiteralFunctionDecl(FD);
3052 return FD->getTypeSpecStartLoc();
3070 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
3071 if (FD->isExternC() && !FD->isMain()) {
3072 const DeclContext *DC = FD->getDeclContext();
3176 FunctionDecl *FD = FunctionDecl::Create(*Context, TUDecl, SourceLocation(),
3179 DeclRefExpr *DRE = new (Context) DeclRefExpr(FD, false, castType, VK_RValue,
3665 for (auto *FD : RD->fields())
3666 RewriteObjCFieldDecl(FD, Result);
4438 void RewriteModernObjC::InsertBlockLiteralsWithinFunction(FunctionDecl *FD) {
4440 (!Blocks.empty()) ? getFunctionSourceLocation(*this, FD)
4441 : FD->getTypeSpecStartLoc();
4442 StringRef FuncName = FD->getName();
4632 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
4639 new (Context) MemberExpr(PE, true, SourceLocation(), FD, SourceLocation(),
4640 FD->getType(), VK_LValue, OK_Ordinary);
4680 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
4687 MemberExpr(DeclRefExp, isArrow, SourceLocation(), FD, SourceLocation(),
4688 FD->getType(), VK_LValue, OK_Ordinary);
4691 FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), SourceLocation(),
4697 new (Context) MemberExpr(ME, true, SourceLocation(), FD, SourceLocation(),
4779 void RewriteModernObjC::RewriteBlockPointerFunctionArgs(FunctionDecl *FD) {
4780 SourceLocation DeclLoc = FD->getLocation();
4876 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
4877 RewriteBlockPointerFunctionArgs(FD);
4887 else if (FieldDecl *FD = dyn_cast<FieldDecl>(ND))
4888 DeclT = FD->getType();
5272 FunctionDecl *FD;
5284 FD = SynthBlockInitFunctionDecl(Tag);
5285 DeclRefExpr *DRE = new (Context) DeclRefExpr(FD, false, FType, VK_RValue,
5291 FD = SynthBlockInitFunctionDecl(Func);
5292 DeclRefExpr *Arg = new (Context) DeclRefExpr(FD, false, FD->getType(),
5325 FD = SynthBlockInitFunctionDecl((*I)->getName());
5326 Exp = new (Context) DeclRefExpr(FD, false, FD->getType(),
5335 FD = SynthBlockInitFunctionDecl((*I)->getName());
5336 Arg = new (Context) DeclRefExpr(FD, false, FD->getType(),
5341 FD = SynthBlockInitFunctionDecl((*I)->getName());
5342 Exp = new (Context) DeclRefExpr(FD, false, FD->getType(),
5369 FD = SynthBlockInitFunctionDecl((*I)->getName());
5370 Exp = new (Context) DeclRefExpr(FD, false, FD->getType(), VK_LValue,
5683 for (auto *FD : RD->fields()) {
5684 if (isTopLevelBlockPointerType(FD->getType()))
5685 RewriteBlockPointerDecl(FD);
5686 if (FD->getType()->isObjCQualifiedIdType() ||
5687 FD->getType()->isObjCQualifiedInterfaceType())
5688 RewriteObjCQualifiedInterfaceTypes(FD);
5697 FunctionDecl *FD = cast<FunctionDecl>(D);
5698 if (FD->isOverloadedOperator())
5704 RewriteBlocksInFunctionProtoType(FD->getType(), FD);
5706 if (!FD->isThisDeclarationADefinition())
5710 if (CompoundStmt *Body = dyn_cast_or_null<CompoundStmt>(FD->getBody())) {
5711 CurFunctionDef = FD;
5715 FD->setBody(Body);
5723 InsertBlockLiteralsWithinFunction(FD);
7534 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
7541 MemberExpr(PE, true, SourceLocation(), FD, SourceLocation(),
7542 FD->getType(), VK_LValue, OK_Ordinary);
7563 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
7570 MemberExpr(PE, /*isArrow*/ false, SourceLocation(), FD,
7571 SourceLocation(), FD->getType(), VK_LValue, OK_Ordinary);