Lines Matching refs:Ty
36 static bool isDispatchBlock(QualType Ty) { in isDispatchBlock() argument
38 const BlockPointerType *BPT = Ty->getAs<BlockPointerType>(); in isDispatchBlock()
55 BinaryOperator *makeAssignment(const Expr *LHS, const Expr *RHS, QualType Ty);
69 UnaryOperator *makeDereference(const Expr *Arg, QualType Ty);
72 Expr *makeIntegralCast(const Expr *Arg, QualType Ty);
78 ImplicitCastExpr *makeLvalueToRvalue(const Expr *Arg, QualType Ty);
87 ImplicitCastExpr *makeImplicitCast(const Expr *Arg, QualType Ty,
91 CastExpr *makeReferenceCast(const Expr *Arg, QualType Ty);
103 IntegerLiteral *makeIntegerLiteral(uint64_t Value, QualType Ty);
120 QualType Ty) { in makeAssignment() argument
122 C, const_cast<Expr *>(LHS), const_cast<Expr *>(RHS), BO_Assign, Ty, in makeAssignment()
152 UnaryOperator *ASTMaker::makeDereference(const Expr *Arg, QualType Ty) { in makeDereference() argument
153 return UnaryOperator::Create(C, const_cast<Expr *>(Arg), UO_Deref, Ty, in makeDereference()
158 ImplicitCastExpr *ASTMaker::makeLvalueToRvalue(const Expr *Arg, QualType Ty) { in makeLvalueToRvalue() argument
159 return makeImplicitCast(Arg, Ty, CK_LValueToRValue); in makeLvalueToRvalue()
171 ImplicitCastExpr *ASTMaker::makeImplicitCast(const Expr *Arg, QualType Ty, in makeImplicitCast() argument
173 return ImplicitCastExpr::Create(C, Ty, in makeImplicitCast()
181 CastExpr *ASTMaker::makeReferenceCast(const Expr *Arg, QualType Ty) { in makeReferenceCast() argument
182 assert(Ty->isReferenceType()); in makeReferenceCast()
184 C, Ty.getNonReferenceType(), in makeReferenceCast()
185 Ty->isLValueReferenceType() ? VK_LValue : VK_XValue, CK_NoOp, in makeReferenceCast()
187 /*Written=*/C.getTrivialTypeSourceInfo(Ty), FPOptionsOverride(), in makeReferenceCast()
191 Expr *ASTMaker::makeIntegralCast(const Expr *Arg, QualType Ty) { in makeIntegralCast() argument
192 if (Arg->getType() == Ty) in makeIntegralCast()
194 return makeImplicitCast(Arg, Ty, CK_IntegralCast); in makeIntegralCast()
202 QualType Ty = C.getBOOLDecl() ? C.getBOOLType() : C.ObjCBuiltinBoolTy; in makeObjCBool() local
203 return new (C) ObjCBoolLiteralExpr(Val, Ty, SourceLocation()); in makeObjCBool()
219 IntegerLiteral *ASTMaker::makeIntegerLiteral(uint64_t Value, QualType Ty) { in makeIntegerLiteral() argument
220 llvm::APInt APValue = llvm::APInt(C.getTypeSize(Ty), Value); in makeIntegerLiteral()
221 return IntegerLiteral::Create(C, APValue, Ty, SourceLocation()); in makeIntegerLiteral()
264 QualType Ty = Callback->getType(); in create_call_once_funcptr_call() local
267 if (Ty->isRValueReferenceType()) { in create_call_once_funcptr_call()
269 Call, Ty.getNonReferenceType(), CK_LValueToRValue); in create_call_once_funcptr_call()
270 } else if (Ty->isLValueReferenceType() && in create_call_once_funcptr_call()
272 Ty = C.getPointerType(Ty.getNonReferenceType()); in create_call_once_funcptr_call()
273 SubExpr = M.makeImplicitCast(Call, Ty, CK_FunctionToPointerDecay); in create_call_once_funcptr_call()
274 } else if (Ty->isLValueReferenceType() in create_call_once_funcptr_call()
524 QualType Ty = Block->getType(); in create_dispatch_once() local
525 if (!isDispatchBlock(Ty)) in create_dispatch_once()
598 QualType Ty = PV->getType(); in create_dispatch_sync() local
599 if (!isDispatchBlock(Ty)) in create_dispatch_sync()
611 ImplicitCastExpr *ICE = M.makeLvalueToRvalue(DR, Ty); in create_dispatch_sync()