================
@@ -492,7 +490,19 @@ void PthreadLockChecker::AcquireLockAux(const CallEvent
&Call,
// Record that the lock was acquired.
lockSucc = lockSucc->add<LockSet>(lockR);
lockSucc = lockSucc->set<LockMap>(lockR, LockState::getLocked());
- C.addTransition(lockSucc);
+ const NoteTag *Note =
+ C.getNoteTag([lockR](PathSensitiveBugReport &BR, llvm::raw_ostream &OS) {
+ if (BR.getBugType().getCategory() != "Lock checker")
+ return;
+ if (!BR.isInteresting(lockR))
+ return;
----------------
NagyDonat wrote:
These two checks appear multiple times, consider replacing them with something
like
```c++
if (!lockR->isRelevantForReport(BR))
return;
```
by introducing a method `isRelevantForReport()` that performs these two checks.
(Feel free to pick a different name etc. if you prefer.)
https://github.com/llvm/llvm-project/pull/202473
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits