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

2017-03-08 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thi has been committed in r290505. https://reviews.llvm.org/D22862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2016-11-30 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. Overall, this looks good to me. Thanks for tackling this! One request, though. Could you move the tests into already existing test files? We're trying to avoid test files that only test a single issue. This makes it easier for people

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

2016-11-21 Thread Anton Yartsev via cfe-commits
ayartsev updated this revision to Diff 78810. ayartsev added a comment. The updated patch implements Devin's solution. Please review. https://reviews.llvm.org/D22862 Files: lib/StaticAnalyzer/Core/ExprEngineC.cpp lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp

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

2016-08-15 Thread Artem Dergachev via cfe-commits
NoQ added a comment. > @dcoughlin, @NoQ, could you, please, tell, how you get dumps of symbolic > expressions and constraints like "(conj_$6{void *}) != 0U"? Tried different > debug.* checkers and clang_analyzer_explain() but failed. That's `SVal.dump()`, `SymbolRef->dump()`,

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

2016-08-14 Thread Anton Yartsev via cfe-commits
ayartsev added a comment. @zaks.anna, sorry for the noise about the "misc-ps-region-store.m" test, my mistake. In https://reviews.llvm.org/D22862#508674, @NoQ wrote: > Hmm. The test in `unwanted-programstate-data-propagation.c` passes on my > machine even without the patch, and the return

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

2016-08-08 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Hmm. The test in `unwanted-programstate-data-propagation.c` passes on my machine even without the patch, and the return value on the respective path is correctly represented as `(conj_$6{void *}) != 0U`, which comes from the `evalCast()` call in `VisitLogicalExpr()` and is

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

2016-07-29 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. As PR15623 shows, returning the existing cast is not correct. But rather than replace it with an unknown, here is a proposal for how to address this without regressing in precision. Instead of using `assumeDual()` in `ExprEngine::VisitLogicalExpr()` on the `RHSVal`

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

2016-07-28 Thread Anton Yartsev via cfe-commits
ayartsev added inline comments. 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.

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

2016-07-28 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. 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. ayartsev

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

2016-07-27 Thread Anna Zaks via cfe-commits
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 @@

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

2016-07-27 Thread Anton Yartsev via cfe-commits
ayartsev created this revision. ayartsev added reviewers: zaks.anna, krememek. ayartsev added a subscriber: cfe-commits. The attached patch eliminates unneeded checker data propagation from one of the operands of a logical operation to the operation result. The result of a logical operation is