zaks.anna added a comment.

I did not think of solution #1! It's definitely better than the pattern 
matching I've added here. However, this checker fires so infrequently, that I 
do not think it's worth investing more time into perfecting it.

I suspect the solution #2 is what this checker was trying to use to begin with. 
It marks the return symbol as dependent on the allocated symbol by calling:

  C.getSymbolManager().addSymbolDependency(V, RetStatusSymbol);

However, addSymbolDependency only worked for isLive() and not for !isDead(). 
Would be good to investigate this further as other checkers such as malloc also 
use addSymbolDependency.


https://reviews.llvm.org/D28330



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

Reply via email to