diff --git a/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp @@ -302,7 +302,6 @@ state = state->set(lockR, LockState::getUnlocked()); } else state = state->set(lockR, LockState::getDestroyed()); - // Removing the map entry (lockR, sym) from DestroyRetVal as the lock state is // now resolved. state = state->remove(lockR); @@ -339,7 +338,16 @@ } } - // TODO: Dump destroyed mutex symbols? + DestroyRetValTy DRV = State->get(); + if (!DRV.isEmpty()) { + Out << Sep << "Mutex destroys with unknown result:" << NL; + for (auto I : DRV) { + I.first->dumpToStream(Out); + Out << ": "; + I.second->dumpToStream(Out); + Out << NL; + } + } } void PthreadLockChecker::AcquirePthreadLock(const CallEvent &Call,