[PATCH] D85431: [analyzer] Implement a new checker ThreadPrimitivesChecker

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 01:09:28 PDT 2020


ASDenysPetrov added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/ThreadPrimitivesChecker.cpp:46
+
+REGISTER_SET_WITH_PROGRAMSTATE(LockedMutexes, SVal)
+
----------------
vsavchenko wrote:
> vsavchenko wrote:
> > You should also cleanup and remove dead symbols from the set.
> Maybe `SymbolRef` is more suitable here?
>Maybe SymbolRef is more suitable here?
I'm afraid it's not. Sval keeps some data but this data 
See, getCXXThisVal returns SVal which is MemRegionVal, thus I can't cast it to SymbolVal and get SymbolRef.
But I would appreciate if you could tell me what other actionsI should do to get a correct SymbolRef.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85431/new/

https://reviews.llvm.org/D85431



More information about the cfe-commits mailing list