[PATCH] D22862: [analyzer] Fix for PR15623: eliminate unwanted ProgramState checker data propagation.

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 27 22:13:16 PDT 2016


zaks.anna added a comment.

I am not sure it's the right way of fixing this problem and it introduces a regression. The bug is probably specific to "&&".

+ Devin as we might have seen something similar.


================
Comment at: test/Analysis/misc-ps-region-store.m:332
@@ -330,3 +331,3 @@
   if (p < q) {
     // If we reach here, 'p' cannot be null.  If 'p' is null, then 'n' must
     // be '0', meaning that this branch is not feasible.
----------------
Try substituting 'p' with null and you will se that n must be zero in that case because, otherwise, we would take the early return branch. Since p is not null, we should not warn here. 

This is a regression.


https://reviews.llvm.org/D22862





More information about the cfe-commits mailing list