]> granicus.if.org Git - clang/commit
[analyzer] Pass the correct loc Expr from VisitIncDecOp to evalStore
authorRafael Stahl <r.stahl@tum.de>
Mon, 7 Jan 2019 15:07:01 +0000 (15:07 +0000)
committerRafael Stahl <r.stahl@tum.de>
Mon, 7 Jan 2019 15:07:01 +0000 (15:07 +0000)
commit20cee7d894a7a9e28901ba02906b2a36967bca07
treef860ed16ca40be8e81638f8ee85451ba3c0f15c4
parent7eadfa4ba2821e7394224da7023128dc9b36eebd
[analyzer] Pass the correct loc Expr from VisitIncDecOp to evalStore

Summary: The LocationE parameter of evalStore is documented as "The location expression that is stored to". When storing from an increment / decrement operator this was not satisfied. In user code this causes an inconsistency between the SVal and Stmt parameters of checkLocation.

Reviewers: NoQ, dcoughlin, george.karpenkov

Reviewed By: NoQ

Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350528 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngineC.cpp
unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp