Lines Matching refs:Call
51 bool isBlockingFunction(const CallEvent &Call) const;
52 bool isLockFunction(const CallEvent &Call) const;
53 bool isUnlockFunction(const CallEvent &Call) const;
58 void checkPostCall(const CallEvent &Call, CheckerContext &C) const;
98 bool BlockInCriticalSectionChecker::isBlockingFunction(const CallEvent &Call) const { in isBlockingFunction()
99 if (Call.isCalled(SleepFn) in isBlockingFunction()
100 || Call.isCalled(GetcFn) in isBlockingFunction()
101 || Call.isCalled(FgetsFn) in isBlockingFunction()
102 || Call.isCalled(ReadFn) in isBlockingFunction()
103 || Call.isCalled(RecvFn)) { in isBlockingFunction()
109 bool BlockInCriticalSectionChecker::isLockFunction(const CallEvent &Call) const { in isLockFunction()
110 if (const auto *Ctor = dyn_cast<CXXConstructorCall>(&Call)) { in isLockFunction()
116 if (Call.isCalled(LockFn) in isLockFunction()
117 || Call.isCalled(PthreadLockFn) in isLockFunction()
118 || Call.isCalled(PthreadTryLockFn) in isLockFunction()
119 || Call.isCalled(MtxLock) in isLockFunction()
120 || Call.isCalled(MtxTimedLock) in isLockFunction()
121 || Call.isCalled(MtxTryLock)) { in isLockFunction()
127 bool BlockInCriticalSectionChecker::isUnlockFunction(const CallEvent &Call) const { in isUnlockFunction()
128 if (const auto *Dtor = dyn_cast<CXXDestructorCall>(&Call)) { in isUnlockFunction()
135 if (Call.isCalled(UnlockFn) in isUnlockFunction()
136 || Call.isCalled(PthreadUnlockFn) in isUnlockFunction()
137 || Call.isCalled(MtxUnlock)) { in isUnlockFunction()
143 void BlockInCriticalSectionChecker::checkPostCall(const CallEvent &Call, in checkPostCall() argument
147 if (!isBlockingFunction(Call) in checkPostCall()
148 && !isLockFunction(Call) in checkPostCall()
149 && !isUnlockFunction(Call)) in checkPostCall()
154 if (isUnlockFunction(Call) && mutexCount > 0) { in checkPostCall()
157 } else if (isLockFunction(Call)) { in checkPostCall()
161 SymbolRef BlockDesc = Call.getReturnValue().getAsSymbol(); in checkPostCall()
162 reportBlockInCritSection(BlockDesc, Call, C); in checkPostCall()
167 SymbolRef BlockDescSym, const CallEvent &Call, CheckerContext &C) const { in reportBlockInCritSection() argument
174 os << "Call to blocking function '" << Call.getCalleeIdentifier()->getName() in reportBlockInCritSection()
178 R->addRange(Call.getSourceRange()); in reportBlockInCritSection()