[PATCH] D18860: [analyzer] Fix the "Zombie symbols" issue.

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 24 15:51:03 PDT 2018


george.karpenkov accepted this revision.
george.karpenkov added inline comments.
This revision is now accepted and ready to land.


================
Comment at: test/Analysis/self-assign.cpp:42
   str = rhs.str;
-  rhs.str = nullptr; // FIXME: An improved leak checker should warn here
+  rhs.str = nullptr; // expected-warning{{Potential memory leak}} expected-note{{Potential memory leak}}
   return *this;
----------------
Woo-hoo!


================
Comment at: test/Analysis/simple-stream-checks.c:96
+  fp = 0;
+} // expected-warning {{Opened file is never closed; potential resource leak}}
----------------
Woo-hoo, were we losing this case before?


https://reviews.llvm.org/D18860





More information about the cfe-commits mailing list