[PATCH] D47416: [analyzer] Clean up the program state map of DanglingInternalBufferChecker

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun May 27 23:22:11 PDT 2018


NoQ added a comment.

Yep, great stuff!

I guess, please add a comment on incomplete destructor support in the CFG and/or analyzer core that may cause the region to be never cleaned up. Or perform an extra cleanup pass - not sure if it's worth it, but it should be easy and safe.



================
Comment at: lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp:94
+  RawPtrMapTy RPM = State->get<RawPtrMap>();
+  for (const auto Region : RPM) {
+    if (SymReaper.isDead(Region.second))
----------------
It's kinda weird that something that's not a `const MemRegion *` is called "Region".

I'd rather use a neutral term like "Item".


Repository:
  rC Clang

https://reviews.llvm.org/D47416





More information about the cfe-commits mailing list