|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp 267 Diags.Report(Context->getFullLoc(Old->getBeginLoc()), RewriteFailedDiag)
284 Diags.Report(Context->getFullLoc(Old->getBeginLoc()), RewriteFailedDiag)
295 Diags.Report(Context->getFullLoc(Loc), RewriteFailedDiag);
305 Diags.Report(Context->getFullLoc(Start), RewriteFailedDiag);
509 T = Context->getPointerType(BPT->getPointeeType());
525 T = isConst ? Context->getObjCIdType().withConst()
526 : Context->getObjCIdType();
529 T = Context->getObjCClassType();
536 T = Context->getPointerType(T);
546 QualType OCT = Context->getCanonicalType(T).getUnqualifiedType();
548 if (OCT == Context->getCanonicalType(Context->getObjCIdType()) ||
548 if (OCT == Context->getCanonicalType(Context->getObjCIdType()) ||
549 OCT == Context->getCanonicalType(Context->getObjCClassType()))
549 OCT == Context->getCanonicalType(Context->getObjCClassType()))
577 if (result == Context->getObjCInstanceType())
578 result = Context->getObjCIdType();
581 return Context->getFunctionType(result, args, fpi);
593 IdentifierInfo* II = &Context->Idents.get("load");
594 Selector LoadSel = Context->Selectors.getSelector(0, &II);
599 QualType StrType = Context->getConstantArrayType(
600 Context->CharTy, llvm::APInt(32, Str.size() + 1), nullptr,
602 return StringLiteral::Create(*Context, Str, StringLiteral::Ascii,
672 Context = &context;
673 SM = &Context->getSourceManager();
674 TUDecl = Context->getTranslationUnitDecl();
708 Rewrite.setSourceMgr(Context->getSourceManager(), Context->getLangOpts());
708 Rewrite.setSourceMgr(Context->getSourceManager(), Context->getLangOpts());
866 RecordDecl::Create(*Context, TTK_Struct, TUDecl, SourceLocation(),
867 SourceLocation(), &Context->Idents.get(RecName));
868 QualType PtrStructIMPL = Context->getPointerType(Context->getTagDeclType(RD));
868 QualType PtrStructIMPL = Context->getPointerType(Context->getTagDeclType(RD));
870 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy));
870 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy));
871 Expr *Zero = IntegerLiteral::Create(*Context,
873 Context->UnsignedIntTy, SourceLocation());
874 Zero = NoTypeInfoCStyleCastExpr(Context, PtrStructIMPL, CK_BitCast, Zero);
875 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(),
877 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
879 &Context->Idents.get(D->getNameAsString()),
884 *Context, PE, true, FD, FD->getType(), VK_LValue, OK_Ordinary);
885 IvarT = Context->getDecltypeType(ME, ME->getType());
889 QualType castT = Context->getPointerType(IvarT);
890 std::string TypeString(castT.getAsString(Context->getPrintingPolicy()));
975 FT->getParamType(i).getAsString(Context->getPrintingPolicy());
1220 FPRetType->getReturnType().getAsString(Context->getPrintingPolicy());
1224 ResultStr += T.getAsString(Context->getPrintingPolicy());
1270 QualType selfTy = Context->getObjCInterfaceType(IDecl);
1271 selfTy = Context->getPointerType(selfTy);
1281 ResultStr += Context->getObjCClassType().getAsString(
1282 Context->getPrintingPolicy());
1285 ResultStr += Context->getObjCSelType().getAsString(Context->getPrintingPolicy());
1285 ResultStr += Context->getObjCSelType().getAsString(Context->getPrintingPolicy());
1299 QT.getAsStringInternal(Name, Context->getPrintingPolicy());
1316 FT->getParamType(i).getAsString(Context->getPrintingPolicy());
1449 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(),
1462 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(),
1476 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(),
1532 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(),
1545 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(),
1559 NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(),
1704 elementTypeAsString = ElementType.getAsString(Context->getPrintingPolicy());
1720 elementTypeAsString = VD->getType().getAsString(Context->getPrintingPolicy());
1915 Diags.Report(Context->getFullLoc(S->getBeginLoc()),
2065 Context->getObjCEncodingForType(Exp->getEncodedType(), StrEncoding);
2097 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType,
2097 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType,
2101 QualType pToFunc = Context->getPointerType(msgSendType);
2103 ImplicitCastExpr::Create(*Context, pToFunc, CK_FunctionToPointerDecay,
2108 *Context, ICE, Args, FT->getCallResultType(*Context), VK_RValue, EndLoc);
2108 *Context, ICE, Args, FT->getCallResultType(*Context), VK_RValue, EndLoc);
2153 QualType ElemTy = Context->getBaseElementType(T);
2283 std::string TypeAsString(QT.getAsString(Context->getPrintingPolicy()));
2309 IdentifierInfo *SelGetUidIdent = &Context->Idents.get("sel_registerName");
2311 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst()));
2311 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst()));
2313 getSimpleFunctionType(Context->getObjCSelType(), ArgTys);
2314 SelGetUidFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2332 std::string TypeString(Type.getAsString(Context->getPrintingPolicy()));
2348 std::string TypeString(Type.getAsString(Context->getPrintingPolicy()));
2381 std::string FdStr = Type.getAsString(Context->getPrintingPolicy());
2404 IdentifierInfo *msgSendIdent = &Context->Idents.get("__rw_objc_super");
2406 QualType argT = Context->getObjCIdType();
2410 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(),
2412 SuperConstructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2421 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend");
2423 QualType argT = Context->getObjCIdType();
2426 argT = Context->getObjCSelType();
2429 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(),
2431 MsgSendFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2440 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSendSuper");
2442 ArgTys.push_back(Context->VoidTy);
2443 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(),
2445 MsgSendSuperFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2454 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend_stret");
2456 QualType argT = Context->getObjCIdType();
2459 argT = Context->getObjCSelType();
2462 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(),
2464 MsgSendStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2475 &Context->Idents.get("objc_msgSendSuper_stret");
2477 ArgTys.push_back(Context->VoidTy);
2478 QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(),
2480 MsgSendSuperStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2490 IdentifierInfo *msgSendIdent = &Context->Idents.get("objc_msgSend_fpret");
2492 QualType argT = Context->getObjCIdType();
2495 argT = Context->getObjCSelType();
2498 QualType msgSendType = getSimpleFunctionType(Context->DoubleTy,
2500 MsgSendFpretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2509 IdentifierInfo *getClassIdent = &Context->Idents.get("objc_getClass");
2511 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst()));
2511 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst()));
2512 QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(),
2514 GetClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2524 &Context->Idents.get("class_getSuperclass");
2526 ArgTys.push_back(Context->getObjCClassType());
2527 QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(),
2529 GetSuperClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2539 IdentifierInfo *getClassIdent = &Context->Idents.get("objc_getMetaClass");
2541 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst()));
2541 ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst()));
2542 QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(),
2544 GetMetaClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
2580 VarDecl *NewVD = VarDecl::Create(*Context, TUDecl, SourceLocation(),
2581 SourceLocation(), &Context->Idents.get(S),
2583 DeclRefExpr *DRE = new (Context)
2584 DeclRefExpr(*Context, NewVD, false, strType, VK_LValue, SourceLocation());
2585 Expr *Unop = new (Context)
2586 UnaryOperator(DRE, UO_AddrOf, Context->getPointerType(DRE->getType()),
2589 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, Exp->getType(),
2598 static_cast<unsigned>(Context->getTypeSize(Context->IntTy));
2598 static_cast<unsigned>(Context->getTypeSize(Context->IntTy));
2600 Expr *FlagExp = IntegerLiteral::Create(*Context,
2602 Context->IntTy, Exp->getLocation());
2603 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, Context->ObjCBuiltinBoolTy,
2603 CastExpr *cast = NoTypeInfoCStyleCastExpr(Context, Context->ObjCBuiltinBoolTy,
2605 ParenExpr *PE = new (Context) ParenExpr(Exp->getLocation(), Exp->getExprLoc(),
2654 if (SubExpr->getType()->isIntegralType(*Context) && type->isBooleanType())
2656 subExpr = NoTypeInfoCStyleCastExpr(Context, type, CK, subExpr);
2661 ArgTypes.push_back(Context->getObjCClassType());
2662 ArgTypes.push_back(Context->getObjCSelType());
2671 DeclRefExpr *DRE = new (Context) DeclRefExpr(
2672 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation());
2675 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE);
2675 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE);
2675 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE);
2680 castType = Context->getPointerType(castType);
2681 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast,
2685 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast);
2688 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(),
2709 QualType IntQT = Context->IntTy;
2711 getSimpleFunctionType(Context->VoidTy, IntQT, true);
2714 DeclRefExpr *NSArrayDRE = new (Context) DeclRefExpr(
2715 *Context, NSArrayFD, false, NSArrayFType, VK_RValue, SourceLocation());
2720 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy));
2720 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy));
2721 Expr *count = IntegerLiteral::Create(*Context,
2723 Context->UnsignedIntTy, SourceLocation());
2728 CallExpr::Create(*Context, NSArrayDRE, InitExprs, NSArrayFType, VK_LValue,
2731 FieldDecl *ARRFD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
2733 &Context->Idents.get("arr"),
2734 Context->getPointerType(Context->VoidPtrTy),
2734 Context->getPointerType(Context->VoidPtrTy),
2738 MemberExpr::CreateImplicit(*Context, NSArrayCallExpr, false, ARRFD,
2740 QualType ConstIdT = Context->getObjCIdType().withConst();
2742 NoTypeInfoCStyleCastExpr(Context,
2743 Context->getPointerType(ConstIdT),
2776 Expr *cnt = IntegerLiteral::Create(*Context,
2778 Context->UnsignedIntTy, SourceLocation());
2782 ArgTypes.push_back(Context->getObjCClassType());
2783 ArgTypes.push_back(Context->getObjCSelType());
2792 DeclRefExpr *DRE = new (Context) DeclRefExpr(
2793 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation());
2796 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE);
2796 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE);
2796 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE);
2801 castType = Context->getPointerType(castType);
2802 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast,
2806 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast);
2809 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(),
2830 QualType IntQT = Context->IntTy;
2832 getSimpleFunctionType(Context->VoidTy, IntQT, true);
2835 DeclRefExpr *NSDictDRE = new (Context) DeclRefExpr(
2836 *Context, NSDictFD, false, NSDictFType, VK_RValue, SourceLocation());
2843 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy));
2843 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy));
2844 Expr *count = IntegerLiteral::Create(*Context,
2846 Context->UnsignedIntTy, SourceLocation());
2857 CallExpr::Create(*Context, NSDictDRE, ValueExprs, NSDictFType, VK_LValue,
2860 FieldDecl *ARRFD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
2862 &Context->Idents.get("arr"),
2863 Context->getPointerType(Context->VoidPtrTy),
2863 Context->getPointerType(Context->VoidPtrTy),
2867 MemberExpr::CreateImplicit(*Context, NSValueCallExpr, false, ARRFD,
2869 QualType ConstIdT = Context->getObjCIdType().withConst();
2871 NoTypeInfoCStyleCastExpr(Context,
2872 Context->getPointerType(ConstIdT),
2877 *Context, NSDictDRE, KeyExprs, NSDictFType, VK_LValue, SourceLocation());
2880 MemberExpr::CreateImplicit(*Context, NSKeyCallExpr, false, ARRFD,
2884 NoTypeInfoCStyleCastExpr(Context,
2885 Context->getPointerType(ConstIdT),
2920 Expr *cnt = IntegerLiteral::Create(*Context,
2922 Context->UnsignedIntTy, SourceLocation());
2926 ArgTypes.push_back(Context->getObjCClassType());
2927 ArgTypes.push_back(Context->getObjCSelType());
2933 T = Context->getPointerType(PointeeTy);
2943 DeclRefExpr *DRE = new (Context) DeclRefExpr(
2944 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation());
2947 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE);
2947 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE);
2947 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE);
2952 castType = Context->getPointerType(castType);
2953 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast,
2957 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast);
2960 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(),
2971 SuperStructDecl = RecordDecl::Create(*Context, TTK_Struct, TUDecl,
2973 &Context->Idents.get("__rw_objc_super"));
2977 FieldTypes[0] = Context->getObjCIdType();
2979 FieldTypes[1] = Context->getObjCIdType();
2983 SuperStructDecl->addDecl(FieldDecl::Create(*Context, SuperStructDecl,
2994 return Context->getTagDeclType(SuperStructDecl);
2999 ConstantStringDecl = RecordDecl::Create(*Context, TTK_Struct, TUDecl,
3001 &Context->Idents.get("__NSConstantStringImpl"));
3005 FieldTypes[0] = Context->getObjCIdType();
3007 FieldTypes[1] = Context->IntTy;
3009 FieldTypes[2] = Context->getPointerType(Context->CharTy);
3009 FieldTypes[2] = Context->getPointerType(Context->CharTy);
3011 FieldTypes[3] = Context->LongTy;
3015 ConstantStringDecl->addDecl(FieldDecl::Create(*Context,
3027 return Context->getTagDeclType(ConstantStringDecl);
3093 QualType castType = Context->getPointerType(FuncType);
3107 ArgTypes[i].getAsStringInternal(ArgName, Context->getPrintingPolicy());
3114 Context->getPrintingPolicy());
3120 str += returnType.getAsString(Context->getPrintingPolicy()); str += ");\n";
3124 str += "\t s = (("; str += castType.getAsString(Context->getPrintingPolicy());
3139 str += "\t s = (("; str += castType.getAsString(Context->getPrintingPolicy());
3151 str += "\t"; str += returnType.getAsString(Context->getPrintingPolicy());
3166 IdentifierInfo *ID = &Context->Idents.get(name);
3168 FunctionDecl::Create(*Context, TUDecl, SourceLocation(), SourceLocation(),
3170 DeclRefExpr *DRE = new (Context)
3171 DeclRefExpr(*Context, FD, false, castType, VK_RValue, SourceLocation());
3172 CallExpr *STCE = CallExpr::Create(*Context, DRE, MsgExprs, castType,
3175 FieldDecl *FieldD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
3177 &Context->Idents.get("s"),
3182 *Context, STCE, false, FieldD, FieldD->getType(), VK_LValue, OK_Ordinary);
3236 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3236 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3238 new (Context) DeclRefExpr(*Context,
3238 new (Context) DeclRefExpr(*Context,
3241 Context->getObjCIdType(),
3260 NoTypeInfoCStyleCastExpr(Context,
3261 Context->getObjCIdType(),
3270 DeclRefExpr *DRE = new (Context)
3271 DeclRefExpr(*Context, SuperConstructorFunctionDecl, false, superType,
3273 SuperRep = CallExpr::Create(*Context, DRE, InitExprs, superType,
3281 SuperRep = new (Context) UnaryOperator(SuperRep, UO_AddrOf,
3282 Context->getPointerType(SuperRep->getType()),
3285 SuperRep = NoTypeInfoCStyleCastExpr(Context,
3286 Context->getPointerType(superType),
3291 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs,
3291 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs,
3294 = Context->getTrivialTypeSourceInfo(superType);
3295 SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), superTInfo,
3299 SuperRep = new (Context) UnaryOperator(SuperRep, UO_AddrOf,
3300 Context->getPointerType(SuperRep->getType()),
3316 CastExpr *ArgExpr = NoTypeInfoCStyleCastExpr(Context,
3317 Context->getObjCIdType(),
3332 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3332 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3334 new (Context) DeclRefExpr(*Context,
3334 new (Context) DeclRefExpr(*Context,
3337 Context->getObjCIdType(),
3356 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3356 NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3365 DeclRefExpr *DRE = new (Context)
3366 DeclRefExpr(*Context, SuperConstructorFunctionDecl, false, superType,
3368 SuperRep = CallExpr::Create(*Context, DRE, InitExprs, superType,
3376 SuperRep = new (Context) UnaryOperator(SuperRep, UO_AddrOf,
3377 Context->getPointerType(SuperRep->getType()),
3380 SuperRep = NoTypeInfoCStyleCastExpr(Context,
3381 Context->getPointerType(superType),
3386 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs,
3386 new (Context) InitListExpr(*Context, SourceLocation(), InitExprs,
3389 = Context->getTrivialTypeSourceInfo(superType);
3390 SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), superTInfo,
3409 recExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3409 recExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3431 type = Context->getObjCIdType();
3436 if (SubExpr->getType()->isIntegralType(*Context) &&
3451 userExpr = NoTypeInfoCStyleCastExpr(Context, type, CK, userExpr);
3459 if (userExpr->getType()->isIntegralType(*Context)) {
3468 userExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3468 userExpr = NoTypeInfoCStyleCastExpr(Context, Context->getObjCIdType(),
3485 ArgTypes.push_back(Context->getPointerType(getSuperStructType()));
3487 ArgTypes.push_back(Context->getObjCIdType());
3488 ArgTypes.push_back(Context->getObjCSelType());
3493 ? Context->getObjCIdType()
3503 returnType = Context->getObjCIdType();
3509 DeclRefExpr *DRE = new (Context) DeclRefExpr(
3510 *Context, MsgSendFlavor, false, msgSendType, VK_LValue, SourceLocation());
3516 cast = NoTypeInfoCStyleCastExpr(Context,
3517 Context->getPointerType(Context->VoidTy),
3517 Context->getPointerType(Context->VoidTy),
3525 castType = Context->getPointerType(castType);
3526 cast = NoTypeInfoCStyleCastExpr(Context, castType, CK_BitCast,
3530 ParenExpr *PE = new (Context) ParenExpr(StartLoc, EndLoc, cast);
3533 CallExpr *CE = CallExpr::Create(*Context, PE, MsgExprs, FT->getReturnType(),
3567 = Context->getTrivialTypeSourceInfo(Context->getObjCIdType());
3567 = Context->getTrivialTypeSourceInfo(Context->getObjCIdType());
3568 ProtocolTypeDecl = TypedefDecl::Create(*Context, TUDecl,
3570 &Context->Idents.get("Protocol"),
3573 return Context->getTypeDeclType(ProtocolTypeDecl);
3583 IdentifierInfo *ID = &Context->Idents.get(Name);
3584 VarDecl *VD = VarDecl::Create(*Context, TUDecl, SourceLocation(),
3587 DeclRefExpr *DRE = new (Context) DeclRefExpr(
3588 *Context, VD, false, getProtocolType(), VK_LValue, SourceLocation());
3590 Context, Context->getPointerType(DRE->getType()), CK_BitCast, DRE);
3590 Context, Context->getPointerType(DRE->getType()), CK_BitCast, DRE);
3611 return Context->getSourceManager().isBeforeInTranslationUnit(
3619 return Context->getSourceManager().isBeforeInTranslationUnit(
3635 QualType ElemTy = Context->getBaseElementType(Type);
3699 Type.getAsStringInternal(Name, Context->getPrintingPolicy());
3702 Result += " : "; Result += utostr(fieldDecl->getBitWidthValue(*Context));
3705 const ArrayType *AT = Context->getAsArrayType(Type);
3713 AT = Context->getAsArrayType(AT->getElementType());
3728 Type = Context->getBaseElementType(Type);
3783 RecordDecl *RD = RecordDecl::Create(*Context, TTK_Struct,
3784 Context->getTranslationUnitDecl(),
3786 &Context->Idents.get(StructTagName));
3789 RD->addDecl(FieldDecl::Create(*Context, RD, SourceLocation(), SourceLocation(),
3790 &Context->Idents.get(Ivar->getName()),
3796 return Context->getTagDeclType(RD);
4047 S += "static " + RT.getAsString(Context->getPrintingPolicy()) + " __" +
4071 QT.getAsStringInternal(ParamStr, Context->getPrintingPolicy());
4119 QT = Context->getPointerType(QT);
4120 QT.getAsStringInternal(Name, Context->getPrintingPolicy());
4213 QT = Context->getPointerType(QT);
4214 QT.getAsStringInternal(FieldName, Context->getPrintingPolicy());
4215 QT.getAsStringInternal(ArgName, Context->getPrintingPolicy());
4513 T = Context->getPointerType(T);
4572 new (Context) ConditionalOperator(CONDExp,
4591 RecordDecl *RD = RecordDecl::Create(*Context, TTK_Struct, TUDecl,
4593 &Context->Idents.get("__block_impl"));
4594 QualType PtrBlock = Context->getPointerType(Context->getTagDeclType(RD));
4594 QualType PtrBlock = Context->getPointerType(Context->getTagDeclType(RD));
4613 PtrToFuncCastType = Context->getPointerType(PtrToFuncCastType);
4615 CastExpr *BlkCast = NoTypeInfoCStyleCastExpr(Context, PtrBlock,
4619 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(),
4623 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
4625 &Context->Idents.get("FuncPtr"),
4626 Context->VoidPtrTy, nullptr,
4630 *Context, PE, true, FD, FD->getType(), VK_LValue, OK_Ordinary);
4632 CastExpr *FunkCast = NoTypeInfoCStyleCastExpr(Context, PtrToFuncCastType,
4634 PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), FunkCast);
4644 CallExpr *CE = CallExpr::Create(*Context, PE, BlkExprs, Exp->getType(),
4669 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
4671 &Context->Idents.get("__forwarding"),
4672 Context->VoidPtrTy, nullptr,
4676 *Context, DeclRefExp, isArrow, FD, FD->getType(), VK_LValue, OK_Ordinary);
4679 FD = FieldDecl::Create(*Context, nullptr, SourceLocation(), SourceLocation(),
4680 &Context->Idents.get(Name),
4681 Context->VoidPtrTy, nullptr,
4684 ME = MemberExpr::CreateImplicit(*Context, ME, true, FD, DeclRefExp->getType(),
4688 ParenExpr *PE = new (Context) ParenExpr(DeclRefExp->getExprLoc(),
4703 Expr *Exp = new (Context) UnaryOperator(DRE, UO_Deref, DRE->getType(),
4707 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(),
4759 std::string TypeString(QT.getAsString(Context->getPrintingPolicy()));
4969 static_cast<unsigned>(Context->getTypeSize(Context->IntTy));
4969 static_cast<unsigned>(Context->getTypeSize(Context->IntTy));
4971 static_cast<unsigned>(Context->getTypeSize(Context->VoidPtrTy));
4971 static_cast<unsigned>(Context->getTypeSize(Context->VoidPtrTy));
4973 unsigned offset = (VoidPtrSize*4 + IntSize + IntSize)/Context->getCharWidth();
5036 bool HasCopyAndDispose = Context->BlockRequiresCopying(Ty, ND);
5044 T.getAsStringInternal(Name, Context->getPrintingPolicy());
5188 IdentifierInfo *ID = &Context->Idents.get(name);
5189 QualType FType = Context->getFunctionNoProtoType(Context->VoidPtrTy);
5189 QualType FType = Context->getFunctionNoProtoType(Context->VoidPtrTy);
5190 return FunctionDecl::Create(*Context, TUDecl, SourceLocation(),
5257 QualType FType = Context->getPointerType(BFT);
5272 DeclRefExpr *DRE = new (Context)
5273 DeclRefExpr(*Context, FD, false, FType, VK_RValue, SourceLocation());
5279 DeclRefExpr *Arg = new (Context) DeclRefExpr(
5280 *Context, FD, false, FD->getType(), VK_LValue, SourceLocation());
5281 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy,
5281 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy,
5289 *Context, TUDecl, SourceLocation(), SourceLocation(),
5290 &Context->Idents.get(DescData), Context->VoidPtrTy, nullptr, SC_Static);
5290 &Context->Idents.get(DescData), Context->VoidPtrTy, nullptr, SC_Static);
5291 UnaryOperator *DescRefExpr = new (Context) UnaryOperator(
5292 new (Context) DeclRefExpr(*Context, NewVD, false, Context->VoidPtrTy,
5292 new (Context) DeclRefExpr(*Context, NewVD, false, Context->VoidPtrTy,
5292 new (Context) DeclRefExpr(*Context, NewVD, false, Context->VoidPtrTy,
5294 UO_AddrOf, Context->getPointerType(Context->VoidPtrTy), VK_RValue,
5294 UO_AddrOf, Context->getPointerType(Context->VoidPtrTy), VK_RValue,
5307 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(),
5307 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(),
5311 QT = Context->getPointerType(QT);
5312 Exp = new (Context) UnaryOperator(Exp, UO_AddrOf, QT, VK_RValue,
5318 Arg = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(),
5318 Arg = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(),
5320 Exp = NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy,
5320 Exp = NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy,
5324 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(),
5324 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(),
5328 QT = Context->getPointerType(QT);
5329 Exp = new (Context) UnaryOperator(Exp, UO_AddrOf, QT, VK_RValue,
5344 IdentifierInfo *II = &Context->Idents.get(RecName.c_str()
5346 RecordDecl *RD = RecordDecl::Create(*Context, TTK_Struct, TUDecl,
5350 QualType castT = Context->getPointerType(Context->getTagDeclType(RD));
5350 QualType castT = Context->getPointerType(Context->getTagDeclType(RD));
5353 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(),
5353 Exp = new (Context) DeclRefExpr(*Context, FD, false, FD->getType(),
5369 Exp = new (Context) UnaryOperator(Exp, UO_AddrOf,
5370 Context->getPointerType(Exp->getType()),
5373 Exp = NoTypeInfoCStyleCastExpr(Context, castT, CK_BitCast, Exp);
5381 static_cast<unsigned>(Context->getTypeSize(Context->IntTy));
5381 static_cast<unsigned>(Context->getTypeSize(Context->IntTy));
5382 Expr *FlagExp = IntegerLiteral::Create(*Context, llvm::APInt(IntSize, flag),
5383 Context->IntTy, SourceLocation());
5386 NewRep = CallExpr::Create(*Context, DRE, InitExprs, FType, VK_LValue,
5396 NewRep = new (Context) UnaryOperator(NewRep, UO_AddrOf,
5397 Context->getPointerType(NewRep->getType()),
5399 NewRep = NoTypeInfoCStyleCastExpr(Context, FType, CK_BitCast,
5402 NewRep = new (Context) ParenExpr(SourceLocation(), SourceLocation(),
5838 Write_ProtocolExprReferencedMetadata(Context, ProtDecl, Preamble);
6841 WriteModernMetadataDeclarations(Context, Result);
6878 Write__extendedMethodTypes_initializer(*this, Context, Result,
6884 Write_protocol_list_initializer(Context, Result, SuperProtocols,
6888 Write_method_list_t_initializer(*this, Context, Result, InstanceMethods,
6892 Write_method_list_t_initializer(*this, Context, Result, ClassMethods,
6896 Write_method_list_t_initializer(*this, Context, Result, OptInstanceMethods,
6900 Write_method_list_t_initializer(*this, Context, Result, OptClassMethods,
6907 Write_prop_list_t_initializer(*this, Context, Result, ProtocolProperties,
7006 WriteModernMetadataDeclarations(Context, Result);
7017 Write__ivar_list_t_initializer(*this, Context, Result, IVars,
7044 Write_method_list_t_initializer(*this, Context, Result, InstanceMethods,
7050 Write_method_list_t_initializer(*this, Context, Result, ClassMethods,
7067 Write_protocol_list_initializer(Context, Result,
7075 Write_prop_list_t_initializer(*this, Context, Result, ClassProperties,
7094 Write__class_ro_t_initializer(Context, Result, flags,
7108 if (hasObjCExceptionAttribute(*Context, CDecl))
7133 Write__class_ro_t_initializer(Context, Result, flags,
7142 Write_class_t(Context, Result,
7146 Write_class_t(Context, Result,
7261 WriteModernMetadataDeclarations(Context, Result);
7292 Write_method_list_t_initializer(*this, Context, Result, InstanceMethods,
7298 Write_method_list_t_initializer(*this, Context, Result, ClassMethods,
7310 Write_protocol_list_initializer(Context, Result,
7318 Write_prop_list_t_initializer(*this, Context, Result, ClassProperties,
7323 Write_category_t(*this, Context, Result,
7417 Context->getObjCEncodingForMethodDecl(*MethodBegin, MethodTypeString);
7427 Context->getObjCEncodingForMethodDecl(*MethodBegin, MethodTypeString);
7472 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context,
7473 Context->getPointerType(Context->CharTy),
7473 Context->getPointerType(Context->CharTy),
7476 VarDecl *NewVD = VarDecl::Create(*Context, TUDecl, SourceLocation(),
7477 SourceLocation(), &Context->Idents.get(IvarOffsetName),
7478 Context->UnsignedLongTy, nullptr,
7480 DeclRefExpr *DRE = new (Context)
7481 DeclRefExpr(*Context, NewVD, false, Context->UnsignedLongTy,
7481 DeclRefExpr(*Context, NewVD, false, Context->UnsignedLongTy,
7484 new (Context) BinaryOperator(castExpr, DRE, BO_Add,
7485 Context->getPointerType(Context->CharTy),
7485 Context->getPointerType(Context->CharTy),
7488 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(),
7508 *Context, TTK_Struct, TUDecl, SourceLocation(), SourceLocation(),
7509 &Context->Idents.get(RecName));
7510 QualType PtrStructIMPL = Context->getPointerType(Context->getTagDeclType(RD));
7510 QualType PtrStructIMPL = Context->getPointerType(Context->getTagDeclType(RD));
7512 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy));
7512 static_cast<unsigned>(Context->getTypeSize(Context->UnsignedIntTy));
7513 Expr *Zero = IntegerLiteral::Create(*Context,
7515 Context->UnsignedIntTy, SourceLocation());
7516 Zero = NoTypeInfoCStyleCastExpr(Context, PtrStructIMPL, CK_BitCast, Zero);
7517 ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(),
7519 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
7521 &Context->Idents.get(D->getNameAsString()),
7526 *Context, PE, true, FD, FD->getType(), VK_LValue, OK_Ordinary);
7527 IvarT = Context->getDecltypeType(ME, ME->getType());
7531 QualType castT = Context->getPointerType(IvarT);
7533 castExpr = NoTypeInfoCStyleCastExpr(Context,
7539 Expr *Exp = new (Context) UnaryOperator(castExpr, UO_Deref, IvarT,
7542 PE = new (Context) ParenExpr(OldRange.getBegin(),
7547 FieldDecl *FD = FieldDecl::Create(*Context, nullptr, SourceLocation(),
7549 &Context->Idents.get(D->getNameAsString()),
7554 MemberExpr::CreateImplicit(*Context, PE, /*isArrow*/ false, FD,