Home
last modified time | relevance | path

Searched refs:Call (Results 1 – 25 of 544) sorted by relevance

12345678910>>...22

/freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/
H A DSPIRVBuiltins.cpp575 const SPIRV::IncomingCall *Call, in buildOpFromWrapper() argument
581 MIB.addDef(Call->ReturnRegister).addUse(TypeReg);
582 unsigned Sz = Call->Arguments.size() - ImmArgs.size();
584 Register ArgReg = Call->Arguments[i];
595 static bool buildAtomicInitInst(const SPIRV::IncomingCall *Call, in buildAtomicInitInst() argument
597 if (Call->isSpirvOp()) in buildAtomicInitInst()
598 return buildOpFromWrapper(MIRBuilder, SPIRV::OpStore, Call, Register(0)); in buildAtomicInitInst()
600 assert(Call->Arguments.size() == 2 && in buildAtomicInitInst()
602 MIRBuilder.getMRI()->setRegClass(Call->Arguments[0], &SPIRV::IDRegClass); in buildAtomicInitInst()
603 MIRBuilder.getMRI()->setRegClass(Call->Arguments[1], &SPIRV::IDRegClass); in buildAtomicInitInst()
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DCastValueChecker.cpp34 class CastValueChecker : public Checker<check::DeadSymbols, eval::Call> {
38 std::function<void(const CastValueChecker *, const CallEvent &Call,
54 bool evalCall(const CallEvent &Call, CheckerContext &C) const;
78 void evalCast(const CallEvent &Call, DefinedOrUnknownSVal DV,
80 void evalDynCast(const CallEvent &Call, DefinedOrUnknownSVal DV,
82 void evalCastOrNull(const CallEvent &Call, DefinedOrUnknownSVal DV,
84 void evalDynCastOrNull(const CallEvent &Call, DefinedOrUnknownSVal DV,
86 void evalCastAs(const CallEvent &Call, DefinedOrUnknownSVal DV,
88 void evalGetAs(const CallEvent &Call, DefinedOrUnknownSVal DV,
90 void evalIsa(const CallEvent &Call, DefinedOrUnknownSVal DV,
[all …]
H A DBlockInCriticalSectionChecker.cpp66 [[nodiscard]] bool matches(const CallEvent &Call, bool IsLock) const { in matches() argument
68 return LockFn.matches(Call); in matches()
70 return UnlockFn.matches(Call); in matches()
79 [[nodiscard]] const MemRegion *getRegion(const CallEvent &Call, bool) const { in getRegion() argument
80 return Call.getArgSVal(0).getAsRegion(); in getRegion()
89 [[nodiscard]] const MemRegion *getRegion(const CallEvent &Call, bool) const { in getRegion() argument
90 return cast<CXXMemberCall>(Call).getCXXThisVal().getAsRegion(); in getRegion()
99 void initIdentifierInfo(const CallEvent &Call) const { in initIdentifierInfo()
106 const auto &ASTCtx = Call.getState()->getStateManager().getContext(); in initIdentifierInfo()
111 template <typename T> bool matchesImpl(const CallEvent &Call) const { in matchesImpl()
[all …]
H A DSmartPtrModeling.cpp45 : public Checker<eval::Call, check::DeadSymbols, check::RegionChanges,
48 bool isBoolConversionMethod(const CallEvent &Call) const;
53 bool evalCall(const CallEvent &Call, CheckerContext &C) const;
60 const LocationContext *LCtx, const CallEvent *Call) const;
66 void handleReset(const CallEvent &Call, CheckerContext &C) const;
67 void handleRelease(const CallEvent &Call, CheckerContext &C) const;
68 void handleSwapMethod(const CallEvent &Call, CheckerContext &C) const;
69 void handleGet(const CallEvent &Call, CheckerContext &C) const;
70 bool handleAssignOp(const CallEvent &Call, CheckerContext &C) const;
71 bool handleMoveCtr(const CallEvent &Call, CheckerContext &C,
[all …]
H A DPthreadLockChecker.cpp85 typedef void (PthreadLockChecker::*FnCheck)(const CallEvent &Call,
209 void InitAnyLock(const CallEvent &Call, CheckerContext &C,
211 void InitLockAux(const CallEvent &Call, CheckerContext &C,
216 void AcquirePthreadLock(const CallEvent &Call, CheckerContext &C,
218 void AcquireXNULock(const CallEvent &Call, CheckerContext &C,
220 void TryPthreadLock(const CallEvent &Call, CheckerContext &C,
222 void TryXNULock(const CallEvent &Call, CheckerContext &C,
224 void TryFuchsiaLock(const CallEvent &Call, CheckerContext &C,
226 void TryC11Lock(const CallEvent &Call, CheckerContext &C,
228 void AcquireLockAux(const CallEvent &Call, CheckerContext &C,
[all …]
H A DStdVariantChecker.cpp35 getConstructorDeclarationForCall(const CallEvent &Call) { in getConstructorDeclarationForCall() argument
36 const auto *ConstructorCall = dyn_cast<CXXConstructorCall>(&Call); in getConstructorDeclarationForCall()
43 bool isCopyConstructorCall(const CallEvent &Call) { in isCopyConstructorCall() argument
45 getConstructorDeclarationForCall(Call)) in isCopyConstructorCall()
50 bool isCopyAssignmentCall(const CallEvent &Call) { in isCopyAssignmentCall() argument
51 const Decl *CopyAssignmentDecl = Call.getDecl(); in isCopyAssignmentCall()
59 bool isMoveConstructorCall(const CallEvent &Call) { in isMoveConstructorCall() argument
61 getConstructorDeclarationForCall(Call); in isMoveConstructorCall()
68 bool isMoveAssignmentCall(const CallEvent &Call) { in isMoveAssignmentCall() argument
69 const Decl *CopyAssignmentDecl = Call.getDecl(); in isMoveAssignmentCall()
[all …]
H A DErrnoTesterChecker.cpp28 class ErrnoTesterChecker : public Checker<eval::Call> {
30 bool evalCall(const CallEvent &Call, CheckerContext &C) const;
35 static void evalSetErrno(CheckerContext &C, const CallEvent &Call);
38 static void evalGetErrno(CheckerContext &C, const CallEvent &Call);
44 static void evalSetErrnoIfError(CheckerContext &C, const CallEvent &Call);
49 const CallEvent &Call);
69 static void evalSetErrnoCheckState(CheckerContext &C, const CallEvent &Call);
88 const CallEvent &Call) { in evalSetErrno() argument
90 Call.getArgSVal(0), Irrelevant)); in evalSetErrno()
94 const CallEvent &Call) { in evalGetErrno() argument
[all …]
H A DMallocChecker.cpp287 static bool isStandardNewDelete(const CallEvent &Call) { in isStandardNewDelete() argument
288 if (!Call.getDecl() || !isa<FunctionDecl>(Call.getDecl())) in isStandardNewDelete()
290 return isStandardNewDelete(cast<FunctionDecl>(Call.getDecl())); in isStandardNewDelete()
334 void checkPreCall(const CallEvent &Call, CheckerContext &C) const;
335 void checkPostCall(const CallEvent &Call, CheckerContext &C) const;
336 void checkNewAllocator(const CXXAllocatorCall &Call, CheckerContext &C) const;
337 void checkPostObjCMessage(const ObjCMethodCall &Call, CheckerContext &C) const;
349 const CallEvent *Call,
353 const CallEvent *Call,
372 void NAME(const CallEvent &Call, CheckerContext &C) const;
[all …]
H A DIteratorModeling.cpp96 void handleOverloadedOperator(CheckerContext &C, const CallEvent &Call,
98 void handleAdvanceLikeFunction(CheckerContext &C, const CallEvent &Call,
151 void checkPostCall(const CallEvent &Call, CheckerContext &C) const;
168 const ExplodedNode *findCallEnter(const ExplodedNode *Node, const Expr *Call);
172 void IteratorModeling::checkPostCall(const CallEvent &Call, in checkPostCall() argument
175 const auto *Func = dyn_cast_or_null<FunctionDecl>(Call.getDecl()); in checkPostCall()
181 handleOverloadedOperator(C, Call, Op); in checkPostCall()
185 const auto *OrigExpr = Call.getOriginExpr(); in checkPostCall()
189 const AdvanceFn *Handler = AdvanceLikeFunctions.lookup(Call); in checkPostCall()
191 handleAdvanceLikeFunction(C, Call, OrigExpr, Handler); in checkPostCall()
[all …]
H A DChrootChecker.cpp42 class ChrootChecker : public Checker<eval::Call, check::PreCall> {
57 bool evalCall(const CallEvent &Call, CheckerContext &C) const;
58 void checkPreCall(const CallEvent &Call, CheckerContext &C) const;
61 void evalChroot(const CallEvent &Call, CheckerContext &C) const;
62 void evalChdir(const CallEvent &Call, CheckerContext &C) const;
67 bool ChrootChecker::evalCall(const CallEvent &Call, CheckerContext &C) const { in evalCall() argument
68 if (Chroot.matches(Call)) { in evalCall()
69 evalChroot(Call, C); in evalCall()
72 if (Chdir.matches(Call)) { in evalCall()
73 evalChdir(Call, C); in evalCall()
[all …]
H A DTaggedUnionModeling.h26 bool isCopyConstructorCall(const CallEvent &Call);
27 bool isCopyAssignmentCall(const CallEvent &Call);
28 bool isMoveAssignmentCall(const CallEvent &Call);
29 bool isMoveConstructorCall(const CallEvent &Call);
37 removeInformationStoredForDeadInstances(const CallEvent &Call, in removeInformationStoredForDeadInstances() argument
43 if (Call.isInSystemHeader()) in removeInformationStoredForDeadInstances()
53 void handleConstructorAndAssignment(const CallEvent &Call, CheckerContext &C, in handleConstructorAndAssignment() argument
55 ProgramStateRef State = Call.getState(); in handleConstructorAndAssignment()
60 auto ArgSVal = Call.getArgSVal(0); in handleConstructorAndAssignment()
65 bool IsCopy = isCopyConstructorCall(Call) || isCopyAssignmentCall(Call); in handleConstructorAndAssignment()
[all …]
H A DStreamChecker.cpp220 SVal getStreamArg(const FnDescription *Desc, const CallEvent &Call) { in getStreamArg() argument
223 return Call.getArgSVal(Desc->StreamArgNo); in getStreamArg()
256 class StreamChecker : public Checker<check::PreCall, eval::Call,
271 void checkPreCall(const CallEvent &Call, CheckerContext &C) const;
272 bool evalCall(const CallEvent &Call, CheckerContext &C) const;
276 const CallEvent *Call,
454 void evalFopen(const FnDescription *Desc, const CallEvent &Call,
457 void preFreopen(const FnDescription *Desc, const CallEvent &Call,
459 void evalFreopen(const FnDescription *Desc, const CallEvent &Call,
462 void evalFclose(const FnDescription *Desc, const CallEvent &Call,
[all …]
H A DSetgidSetuidOrderChecker.cpp46 void checkPostCall(const CallEvent &Call, CheckerContext &C) const;
51 void processSetuid(ProgramStateRef State, const CallEvent &Call,
53 void processSetgid(ProgramStateRef State, const CallEvent &Call,
55 void processOther(ProgramStateRef State, const CallEvent &Call,
60 const CallEvent &Call) const;
78 void SetgidSetuidOrderChecker::checkPostCall(const CallEvent &Call, in REGISTER_TRAIT_WITH_PROGRAMSTATE()
81 if (SetuidDesc.matches(Call)) { in REGISTER_TRAIT_WITH_PROGRAMSTATE()
82 processSetuid(State, Call, C); in REGISTER_TRAIT_WITH_PROGRAMSTATE()
83 } else if (SetgidDesc.matches(Call)) { in REGISTER_TRAIT_WITH_PROGRAMSTATE()
84 processSetgid(State, Call, C); in REGISTER_TRAIT_WITH_PROGRAMSTATE()
[all …]
H A DBuiltinFunctionChecker.cpp31 class BuiltinFunctionChecker : public Checker<eval::Call> {
33 bool evalCall(const CallEvent &Call, CheckerContext &C) const;
48 bool isBuiltinLikeFunction(const CallEvent &Call) const;
54 const CallEvent &Call) const { in isBuiltinLikeFunction()
55 const auto *FD = llvm::dyn_cast_or_null<FunctionDecl>(Call.getDecl()); in isBuiltinLikeFunction()
67 return BuiltinLikeStdFunctions.contains(Call); in isBuiltinLikeFunction()
70 bool BuiltinFunctionChecker::evalCall(const CallEvent &Call, in evalCall() argument
73 const auto *FD = dyn_cast_or_null<FunctionDecl>(Call.getDecl()); in evalCall()
78 const Expr *CE = Call.getOriginExpr(); in evalCall()
80 if (isBuiltinLikeFunction(Call)) { in evalCall()
[all …]
H A DSimpleStreamChecker.cpp64 const CallEvent &Call,
70 bool guaranteedNotToCloseFile(const CallEvent &Call) const;
74 void checkPostCall(const CallEvent &Call, CheckerContext &C) const;
76 void checkPreCall(const CallEvent &Call, CheckerContext &C) const;
83 const CallEvent *Call,
93 void SimpleStreamChecker::checkPostCall(const CallEvent &Call, in REGISTER_MAP_WITH_PROGRAMSTATE()
95 if (!OpenFn.matches(Call)) in REGISTER_MAP_WITH_PROGRAMSTATE()
99 SymbolRef FileDesc = Call.getReturnValue().getAsSymbol(); in REGISTER_MAP_WITH_PROGRAMSTATE()
109 void SimpleStreamChecker::checkPreCall(const CallEvent &Call, in checkPreCall() argument
111 if (!CloseFn.matches(Call)) in checkPreCall()
[all …]
H A DCStringChecker.cpp82 class CStringChecker : public Checker< eval::Call,
114 bool evalCall(const CallEvent &Call, CheckerContext &C) const;
125 const CallEvent *Call) const;
199 FnCheck identifyCall(const CallEvent &Call, CheckerContext &C) const;
200 void evalMemcpy(CheckerContext &C, const CallEvent &Call, CharKind CK) const;
201 void evalMempcpy(CheckerContext &C, const CallEvent &Call, CharKind CK) const;
202 void evalMemmove(CheckerContext &C, const CallEvent &Call, CharKind CK) const;
203 void evalBcopy(CheckerContext &C, const CallEvent &Call) const;
204 void evalCopyCommon(CheckerContext &C, const CallEvent &Call,
209 void evalMemcmp(CheckerContext &C, const CallEvent &Call, CharKind CK) const;
[all …]
H A DInnerPointerChecker.cpp95 bool isInvalidatingMemberFunction(const CallEvent &Call) const;
99 void markPtrSymbolsReleased(const CallEvent &Call, ProgramStateRef State,
106 void checkFunctionArguments(const CallEvent &Call, ProgramStateRef State,
112 void checkPostCall(const CallEvent &Call, CheckerContext &C) const;
121 const CallEvent &Call) const { in isInvalidatingMemberFunction()
122 if (const auto *MemOpCall = dyn_cast<CXXMemberOperatorCall>(&Call)) { in isInvalidatingMemberFunction()
128 return isa<CXXDestructorCall>(Call) || in isInvalidatingMemberFunction()
129 InvalidatingMemberFunctions.contains(Call); in isInvalidatingMemberFunction()
132 void InnerPointerChecker::markPtrSymbolsReleased(const CallEvent &Call, in markPtrSymbolsReleased() argument
137 const Expr *Origin = Call.getOriginExpr(); in markPtrSymbolsReleased()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/BPF/
H A DBPFPreserveStaticOffset.cpp131 if (auto *Call = dyn_cast<CallInst>(I)) in isIntrinsicCall() local
132 if (Function *Func = Call->getCalledFunction()) in isIntrinsicCall()
170 static void setParamElementType(CallInst *Call, unsigned ArgNo, Type *Type) { in setParamElementType() argument
171 LLVMContext &C = Call->getContext(); in setParamElementType()
172 Call->addParamAttr(ArgNo, Attribute::get(C, Attribute::ElementType, Type)); in setParamElementType()
175 static void setParamReadNone(CallInst *Call, unsigned ArgNo) { in setParamReadNone() argument
176 LLVMContext &C = Call->getContext(); in setParamReadNone()
177 Call->addParamAttr(ArgNo, Attribute::get(C, Attribute::ReadNone)); in setParamReadNone()
180 static void setParamReadOnly(CallInst *Call, unsigned ArgNo) { in setParamReadOnly() argument
181 LLVMContext &C = Call->getContext(); in setParamReadOnly()
[all …]
H A DBPFAbstractMemberAccess.cpp164 void traceAICall(CallInst *Call, CallInfo &ParentInfo);
171 bool IsPreserveDIAccessIndexCall(const CallInst *Call, CallInfo &Cinfo);
182 Value *computeBaseAndAccessKey(CallInst *Call, CallInfo &CInfo,
184 MDNode *computeAccessKey(CallInst *Call, CallInfo &CInfo,
186 bool transformGEPChain(CallInst *Call, CallInfo &CInfo);
321 static Type *getBaseElementType(const CallInst *Call) { in getBaseElementType() argument
323 return Call->getParamElementType(0); in getBaseElementType()
333 bool BPFAbstractMemberAccess::IsPreserveDIAccessIndexCall(const CallInst *Call, in IsPreserveDIAccessIndexCall() argument
335 if (!Call) in IsPreserveDIAccessIndexCall()
338 const auto *GV = dyn_cast<GlobalValue>(Call->getCalledOperand()); in IsPreserveDIAccessIndexCall()
[all …]
H A DBPFCheckAndAdjustIR.cpp119 auto *Call = dyn_cast<CallInst>(&I); in removePassThroughBuiltin() local
120 if (!Call) in removePassThroughBuiltin()
122 auto *GV = dyn_cast<GlobalValue>(Call->getCalledOperand()); in removePassThroughBuiltin()
128 Value *Arg = Call->getArgOperand(1); in removePassThroughBuiltin()
129 Call->replaceAllUsesWith(Arg); in removePassThroughBuiltin()
130 ToBeDeleted = Call; in removePassThroughBuiltin()
149 auto *Call = dyn_cast<CallInst>(&I); in removeCompareBuiltin() local
150 if (!Call) in removeCompareBuiltin()
152 auto *GV = dyn_cast<GlobalValue>(Call->getCalledOperand()); in removeCompareBuiltin()
159 Value *Arg0 = Call->getArgOperand(0); in removeCompareBuiltin()
[all …]
H A DBPFPreserveDIType.cpp52 auto *Call = dyn_cast<CallInst>(&I); in BPFPreserveDITypeImpl() local
53 if (!Call) in BPFPreserveDITypeImpl()
56 const auto *GV = dyn_cast<GlobalValue>(Call->getCalledOperand()); in BPFPreserveDITypeImpl()
61 if (!Call->getMetadata(LLVMContext::MD_preserve_access_index)) in BPFPreserveDITypeImpl()
64 PreserveDITypeCalls.push_back(Call); in BPFPreserveDITypeImpl()
74 for (auto *Call : PreserveDITypeCalls) { in BPFPreserveDITypeImpl() local
75 const ConstantInt *Flag = dyn_cast<ConstantInt>(Call->getArgOperand(1)); in BPFPreserveDITypeImpl()
82 MDNode *MD = Call->getMetadata(LLVMContext::MD_preserve_access_index); in BPFPreserveDITypeImpl()
109 BasicBlock *BB = Call->getParent(); in BPFPreserveDITypeImpl()
120 Call->getIterator()); in BPFPreserveDITypeImpl()
[all …]
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaOpenCL.cpp138 bool SemaOpenCL::checkSubgroupExt(CallExpr *Call) { in checkSubgroupExt() argument
146 Diag(Call->getBeginLoc(), diag::err_opencl_requires_extension) in checkSubgroupExt()
147 << 1 << Call->getDirectCallee() in checkSubgroupExt()
364 static bool checkPipeArg(Sema &S, CallExpr *Call) { in checkPipeArg() argument
365 const Expr *Arg0 = Call->getArg(0); in checkPipeArg()
368 S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_pipe_first_arg) in checkPipeArg()
369 << Call->getDirectCallee() << Arg0->getSourceRange(); in checkPipeArg()
378 switch (Call->getDirectCallee()->getBuiltinID()) { in checkPipeArg()
414 static bool checkPipePacketType(Sema &S, CallExpr *Call, unsigned Idx) { in checkPipePacketType() argument
415 const Expr *Arg0 = Call->getArg(0); in checkPipePacketType()
[all …]
/freebsd/contrib/llvm-project/clang/lib/AST/Interp/
H A DInterpBuiltin.cpp136 const CallExpr *Call) { in interp__builtin_is_constant_evaluated() argument
166 const CallExpr *Call) { in interp__builtin_strcmp() argument
203 pushInteger(S, Result, Call->getType()); in interp__builtin_strcmp()
209 const CallExpr *Call) { in interp__builtin_strlen() argument
235 pushInteger(S, Len, Call->getType()); in interp__builtin_strlen()
367 const CallExpr *Call) { in interp__builtin_isnan() argument
370 pushInteger(S, Arg.isNan(), Call->getType()); in interp__builtin_isnan()
377 const CallExpr *Call) { in interp__builtin_issignaling() argument
380 pushInteger(S, Arg.isSignaling(), Call->getType()); in interp__builtin_issignaling()
386 bool CheckSign, const CallExpr *Call) { in interp__builtin_isinf() argument
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DPartiallyInlineLibCalls.cpp34 static bool optimizeSQRT(CallInst *Call, Function *CalledFunc, in optimizeSQRT() argument
39 if (Call->onlyReadsMemory()) in optimizeSQRT()
57 Type *Ty = Call->getType(); in optimizeSQRT()
58 IRBuilder<> Builder(Call->getNextNode()); in optimizeSQRT()
63 Builder.getTrue(), Call->getNextNode(), /*Unreachable=*/false, in optimizeSQRT()
75 Call->replaceAllUsesWith(Phi); in optimizeSQRT()
81 Instruction *LibCall = Call->clone(); in optimizeSQRT()
86 Call->setDoesNotAccessMemory(); in optimizeSQRT()
91 ? Builder.CreateFCmpORD(Call, Call) in optimizeSQRT()
92 : Builder.CreateFCmpOGE(Call->getOperand(0), in optimizeSQRT()
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DExprEngineCallAndReturn.cpp189 static bool wasDifferentDeclUsedForInlining(CallEventRef<> Call, in wasDifferentDeclUsedForInlining() argument
192 const Decl *StaticDecl = Call->getDecl(); in wasDifferentDeclUsedForInlining()
202 const CallEvent &Call, const ProgramStateRef State, SValBuilder &SVB) { in getElementCountOfArrayBeingDestructed() argument
203 assert(isa<CXXDestructorCall>(Call) && in getElementCountOfArrayBeingDestructed()
206 const auto &DtorCall = cast<CXXDestructorCall>(Call); in getElementCountOfArrayBeingDestructed()
274 CallEventRef<> Call = CEMgr.getCaller(calleeCtx, state); in processCallExit() local
286 dyn_cast_or_null<CXXDestructorDecl>(Call->getDecl())) { in processCallExit()
302 if (wasDifferentDeclUsedForInlining(Call, calleeCtx)) { in processCallExit()
396 CallEventRef<> UpdatedCall = Call.cloneWithState(CEEState); in processCallExit()
415 if (const ObjCMethodCall *Msg = dyn_cast<ObjCMethodCall>(Call)) { in processCallExit()
[all …]

12345678910>>...22