NoQ added a comment.

Nice!

I suspect you're adding too many notes. The note needs to not be there if the 
*raw* pointer is not tracked. Eg., I suspect that your patch would add a note 
in the following case in which it shouldn't be there because the raw pointer 
value doesn't participate in the report despite smart pointer region being 
interesting:

  std::unique_ptr<A> P;
  A *a = P.get(); // shound't emit a note here
  P->foo();

It's important to not emit redundant notes because users typically take these 
checker-specific notes as an indication that this information is an essential 
piece of evidence of the bug in their program. In this example they'd believe 
that the analyzer has figured out that the smart pointer is null by looking at 
what happens to the raw pointer value. So they may become very confused if this 
isn't the case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97183

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to