Lines Matching defs:FD
291 void RewriteFunctionDecl(FunctionDecl *FD);
294 void RewriteBlockLiteralFunctionDecl(FunctionDecl *FD);
327 void RewriteBlockPointerFunctionArgs(FunctionDecl *FD);
356 CallExpr *SynthesizeCallToFunctionDecl(FunctionDecl *FD,
405 void InsertBlockLiteralsWithinFunction(FunctionDecl *FD);
660 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
661 RewriteFunctionDecl(FD);
2044 FunctionDecl *FD, Expr **args, unsigned nargs, SourceLocation StartLoc,
2047 QualType msgSendType = FD->getType();
2050 DeclRefExpr *DRE = new (Context) DeclRefExpr(FD, false, msgSendType,
2153 else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Dcl)) {
2154 Loc = FD->getLocation();
2157 const FunctionType *funcType = FD->getType()->getAs<FunctionType>();
2164 else if (FieldDecl *FD = dyn_cast<FieldDecl>(Dcl)) {
2165 Loc = FD->getLocation();
2166 Type = FD->getType();
2273 void RewriteObjC::RewriteFunctionDecl(FunctionDecl *FD) {
2275 if (FD->getIdentifier() &&
2276 FD->getName() == "sel_registerName") {
2277 SelGetUidFunctionDecl = FD;
2280 RewriteObjCQualifiedInterfaceTypes(FD);
2327 void RewriteObjC::RewriteBlockLiteralFunctionDecl(FunctionDecl *FD) {
2328 SourceLocation FunLocStart = FD->getTypeSpecStartLoc();
2329 const FunctionType *funcType = FD->getType()->getAs<FunctionType>();
2336 FdStr += FD->getName();
3697 void RewriteObjC::InsertBlockLiteralsWithinFunction(FunctionDecl *FD) {
3698 SourceLocation FunLocStart = FD->getTypeSpecStartLoc();
3699 StringRef FuncName = FD->getName();
3883 FieldDecl *FD = FieldDecl::Create(*Context, 0, SourceLocation(),
3889 MemberExpr *ME = new (Context) MemberExpr(PE, true, FD, SourceLocation(),
3890 FD->getType(), VK_LValue,
3931 FieldDecl *FD = FieldDecl::Create(*Context, 0, SourceLocation(),
3938 FD, SourceLocation(),
3939 FD->getType(), VK_LValue,
3943 FD = FieldDecl::Create(*Context, 0, SourceLocation(), SourceLocation(),
3948 ME = new (Context) MemberExpr(ME, true, FD, SourceLocation(),
4018 void RewriteObjC::RewriteBlockPointerFunctionArgs(FunctionDecl *FD) {
4019 SourceLocation DeclLoc = FD->getLocation();
4118 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
4119 RewriteBlockPointerFunctionArgs(FD);
4129 else if (FieldDecl *FD = dyn_cast<FieldDecl>(ND))
4130 DeclT = FD->getType();
4510 FunctionDecl *FD;
4514 FD = SynthBlockInitFunctionDecl(Tag);
4515 DeclRefExpr *DRE = new (Context) DeclRefExpr(FD, false, FType, VK_RValue,
4521 FD = SynthBlockInitFunctionDecl(Func);
4522 DeclRefExpr *Arg = new (Context) DeclRefExpr(FD, false, FD->getType(),
4555 FD = SynthBlockInitFunctionDecl((*I)->getName());
4556 Exp = new (Context) DeclRefExpr(FD, false, FD->getType(), VK_LValue,
4565 FD = SynthBlockInitFunctionDecl((*I)->getName());
4566 Arg = new (Context) DeclRefExpr(FD, false, FD->getType(), VK_LValue,
4571 FD = SynthBlockInitFunctionDecl((*I)->getName());
4572 Exp = new (Context) DeclRefExpr(FD, false, FD->getType(), VK_LValue,
4599 FD = SynthBlockInitFunctionDecl((*I)->getName());
4600 Exp = new (Context) DeclRefExpr(FD, false, FD->getType(), VK_LValue,
4881 FieldDecl *FD = *i;
4882 if (isTopLevelBlockPointerType(FD->getType()))
4883 RewriteBlockPointerDecl(FD);
4884 if (FD->getType()->isObjCQualifiedIdType() ||
4885 FD->getType()->isObjCQualifiedInterfaceType())
4886 RewriteObjCQualifiedInterfaceTypes(FD);
4895 FunctionDecl *FD = cast<FunctionDecl>(D);
4896 if (FD->isOverloadedOperator())
4902 RewriteBlocksInFunctionProtoType(FD->getType(), FD);
4904 if (!FD->isThisDeclarationADefinition())
4908 if (CompoundStmt *Body = dyn_cast_or_null<CompoundStmt>(FD->getBody())) {
4909 CurFunctionDef = FD;
4910 CurFunctionDeclToDeclareForBlock = FD;
4914 FD->setBody(Body);
4922 InsertBlockLiteralsWithinFunction(FD);