Lines Matching defs:Ty
37 static bool isDispatchBlock(QualType Ty) {
39 const BlockPointerType *BPT = Ty->getAs<BlockPointerType>();
56 BinaryOperator *makeAssignment(const Expr *LHS, const Expr *RHS, QualType Ty);
70 UnaryOperator *makeDereference(const Expr *Arg, QualType Ty);
73 Expr *makeIntegralCast(const Expr *Arg, QualType Ty);
79 ImplicitCastExpr *makeLvalueToRvalue(const Expr *Arg, QualType Ty);
88 ImplicitCastExpr *makeImplicitCast(const Expr *Arg, QualType Ty,
92 CastExpr *makeReferenceCast(const Expr *Arg, QualType Ty);
104 IntegerLiteral *makeIntegerLiteral(uint64_t Value, QualType Ty);
121 QualType Ty) {
123 C, const_cast<Expr *>(LHS), const_cast<Expr *>(RHS), BO_Assign, Ty,
153 UnaryOperator *ASTMaker::makeDereference(const Expr *Arg, QualType Ty) {
154 return UnaryOperator::Create(C, const_cast<Expr *>(Arg), UO_Deref, Ty,
159 ImplicitCastExpr *ASTMaker::makeLvalueToRvalue(const Expr *Arg, QualType Ty) {
160 return makeImplicitCast(Arg, Ty, CK_LValueToRValue);
172 ImplicitCastExpr *ASTMaker::makeImplicitCast(const Expr *Arg, QualType Ty,
174 return ImplicitCastExpr::Create(C, Ty,
182 CastExpr *ASTMaker::makeReferenceCast(const Expr *Arg, QualType Ty) {
183 assert(Ty->isReferenceType());
185 C, Ty.getNonReferenceType(),
186 Ty->isLValueReferenceType() ? VK_LValue : VK_XValue, CK_NoOp,
188 /*Written=*/C.getTrivialTypeSourceInfo(Ty), FPOptionsOverride(),
192 Expr *ASTMaker::makeIntegralCast(const Expr *Arg, QualType Ty) {
193 if (Arg->getType() == Ty)
195 return makeImplicitCast(Arg, Ty, CK_IntegralCast);
203 QualType Ty = C.getBOOLDecl() ? C.getBOOLType() : C.ObjCBuiltinBoolTy;
204 return new (C) ObjCBoolLiteralExpr(Val, Ty, SourceLocation());
220 IntegerLiteral *ASTMaker::makeIntegerLiteral(uint64_t Value, QualType Ty) {
221 llvm::APInt APValue = llvm::APInt(C.getTypeSize(Ty), Value);
222 return IntegerLiteral::Create(C, APValue, Ty, SourceLocation());
265 QualType Ty = Callback->getType();
268 if (Ty->isRValueReferenceType()) {
270 Call, Ty.getNonReferenceType(), CK_LValueToRValue);
271 } else if (Ty->isLValueReferenceType() &&
273 Ty = C.getPointerType(Ty.getNonReferenceType());
274 SubExpr = M.makeImplicitCast(Call, Ty, CK_FunctionToPointerDecay);
275 } else if (Ty->isLValueReferenceType()
525 QualType Ty = Block->getType();
526 if (!isDispatchBlock(Ty))
599 QualType Ty = PV->getType();
600 if (!isDispatchBlock(Ty))
612 ImplicitCastExpr *ICE = M.makeLvalueToRvalue(DR, Ty);