[PATCH] D28330: [analyzer] Fix false positives in Keychain API checker

Anna Zaks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 5 10:01:18 PST 2017


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





More information about the cfe-commits mailing list