Lines Matching refs:Call
61 bool isBlockingFunction(const CallEvent &Call) const;
62 bool isLockFunction(const CallEvent &Call) const;
63 bool isUnlockFunction(const CallEvent &Call) const;
68 void checkPostCall(const CallEvent &Call, CheckerContext &C) const;
88 bool BlockInCriticalSectionChecker::isBlockingFunction(const CallEvent &Call) const { in isBlockingFunction()
89 return matchesAny(Call, SleepFn, GetcFn, FgetsFn, ReadFn, RecvFn); in isBlockingFunction()
92 bool BlockInCriticalSectionChecker::isLockFunction(const CallEvent &Call) const { in isLockFunction()
93 if (const auto *Ctor = dyn_cast<CXXConstructorCall>(&Call)) { in isLockFunction()
99 return matchesAny(Call, LockFn, PthreadLockFn, PthreadTryLockFn, MtxLock, in isLockFunction()
103 bool BlockInCriticalSectionChecker::isUnlockFunction(const CallEvent &Call) const { in isUnlockFunction()
104 if (const auto *Dtor = dyn_cast<CXXDestructorCall>(&Call)) { in isUnlockFunction()
111 return matchesAny(Call, UnlockFn, PthreadUnlockFn, MtxUnlock); in isUnlockFunction()
114 void BlockInCriticalSectionChecker::checkPostCall(const CallEvent &Call, in checkPostCall() argument
118 if (!isBlockingFunction(Call) in checkPostCall()
119 && !isLockFunction(Call) in checkPostCall()
120 && !isUnlockFunction(Call)) in checkPostCall()
125 if (isUnlockFunction(Call) && mutexCount > 0) { in checkPostCall()
128 } else if (isLockFunction(Call)) { in checkPostCall()
132 SymbolRef BlockDesc = Call.getReturnValue().getAsSymbol(); in checkPostCall()
133 reportBlockInCritSection(BlockDesc, Call, C); in checkPostCall()
138 SymbolRef BlockDescSym, const CallEvent &Call, CheckerContext &C) const { in reportBlockInCritSection() argument
145 os << "Call to blocking function '" << Call.getCalleeIdentifier()->getName() in reportBlockInCritSection()
149 R->addRange(Call.getSourceRange()); in reportBlockInCritSection()