Lines Matching refs:Ty

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