[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 29 08:00:33 PST 2019


baloghadamsoftware added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:865
+  if (FreeingMemFnMap.lookup(Call))
     return true;
 
----------------
baloghadamsoftware wrote:
> Maybe `return !!FreeingMemFnMap.lookup(Call)`?
I think the code changed after I wrote this comment, it is not valid anymore.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:879
+bool MallocChecker::isMemCall(const CallEvent &Call) const {
+  if (FreeingMemFnMap.lookup(Call) || NonFreeingMemFnMap.lookup(Call))
     return true;
----------------
baloghadamsoftware wrote:
> Same here: why not just `return FreeingMemFnMap.lookup(Call) || NonFreeingMemFn.lookup(Call)`?
Here as well. Disregard these comments.


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

https://reviews.llvm.org/D68165





More information about the cfe-commits mailing list