]> granicus.if.org Git - clang/commit
Fix for PR15623. The patch eliminates unwanted ProgramState checker data propagation...
authorAnton Yartsev <anton.yartsev@gmail.com>
Fri, 23 Dec 2016 03:31:00 +0000 (03:31 +0000)
committerAnton Yartsev <anton.yartsev@gmail.com>
Fri, 23 Dec 2016 03:31:00 +0000 (03:31 +0000)
commitf090930ae29a82e8152fc64a3f539792da020cf5
tree5f70962bfdc2c52680361ac7946003f25691bc5b
parent5d286f24eaf4c0d4ed833cb379bfceefbe800a52
Fix for PR15623. The patch eliminates unwanted ProgramState checker data propagation from an operand of the logical operation to operation result.
The patch also simplifies an assume of a constraint of the form: "(exp comparison_op expr) != 0" to true into an assume of "exp comparison_op expr" to true. (And similarly, an assume of the form "(exp comparison_op expr) == 0" to true as an assume of exp comparison_op expr to false.) which improves precision overall.
https://reviews.llvm.org/D22862

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290413 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngineC.cpp
lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
test/Analysis/malloc.c
test/Analysis/misc-ps.c