malhar1995 added inline comments.

================
Comment at: lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:143-146
+    if(lstate->isSchrodingerUntouched())
+      state = state->remove<LockMap>(lockR);
+    else if(lstate->isSchrodingerUnlocked())
+      state = state->set<LockMap>(lockR, LockState::getUnlocked());
----------------
NoQ wrote:
> I think we can be certain that the lock is in one of these states, and assert 
> that.
We can be certain that the lock state will be either of the two only if I add 
the following statement before returning from this function.
```
state = state->remove<DestroyRetVal>(lockR);
```
If I don't add the above statement, a return value symbol for the region 
specified by lockR will still be in DestroyRetVal and it may have an actual 
lock state (locked, unlocked or destroyed).


Repository:
  rL LLVM

https://reviews.llvm.org/D32449



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to