[PATCH] D85796: [Analysis] Bug fix for exploded graph branching in evalCall for constructor

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 12 22:02:40 PDT 2020


NoQ added inline comments.


================
Comment at: clang/test/Analysis/smart-ptr-text-output.cpp:39
 void derefAfterRelease() {
-  std::unique_ptr<A> P(new A());
+  std::unique_ptr<A> P(new A()); // expected-note {{Smart pointer 'P' is constructed}}
   P.release(); // expected-note {{Smart pointer 'P' is released and set to null}}
----------------
vrnithinkumar wrote:
> NoQ wrote:
> > Ok, these notes shouldn't be there; a note on `.release()` is sufficient to understand the warning and it looks like that's one more place where we should mark the region as uninteresting.
> > 
> > Can you try to debug why did they suddenly show up?
> I checked the exploded graph for this test case. 
> Before the bug fix, there exists a path where the no Note Tag is added to the corresponding `CXXConstructExpr`. After the fix removed this branching theres always a Note Tag on Ctr. {F12591752}
> 
> Since the note on .release() is sufficient to understand the warning and I agree we should mark this region as uninteresting.
Ok, fair enough! Let's add a FIXME.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85796



More information about the cfe-commits mailing list