]> granicus.if.org Git - clang/commit
[Analyzer] Fix for SValBuilder expressions rearrangement
authorAdam Balogh <adam.balogh@ericsson.com>
Fri, 13 Apr 2018 20:23:02 +0000 (20:23 +0000)
committerAdam Balogh <adam.balogh@ericsson.com>
Fri, 13 Apr 2018 20:23:02 +0000 (20:23 +0000)
commitb11c48d1760a6323e6513e9494b5b0ca587cf4d4
treec45aabd7b1c52e05636dd5926c3682e6a42850db
parent87460c837c1ab39752b549d2bef342018a409677
[Analyzer] Fix for SValBuilder expressions rearrangement

Expression rearrangement in SValBuilder (see rL329780) crashes with an assert if the type of the integer is different from the type of the symbol. This fix adds a check that prevents rearrangement in such cases.

Differential Revision: https://reviews.llvm.org/D45557

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330064 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
test/Analysis/svalbuilder-rearrange-comparisons.c