]> granicus.if.org Git - clang/commit
[analyzer] const init: handle non-explicit cases more accurately
authorRafael Stahl <r.stahl@tum.de>
Tue, 29 May 2018 14:14:22 +0000 (14:14 +0000)
committerRafael Stahl <r.stahl@tum.de>
Tue, 29 May 2018 14:14:22 +0000 (14:14 +0000)
commit29dd917851205d5fa107f9f16e6c52612f24b91c
tree6eeee9d3452fa71fb7e1fa11071b61be2756dd3d
parentc01eff1a9b07b7f9c62381adc5a49cf46d274910
[analyzer] const init: handle non-explicit cases more accurately

Summary: If the access is out of bounds, return UndefinedVal. If it is missing an explicit init, return the implicit zero value it must have.

Reviewers: NoQ, xazax.hun, george.karpenkov

Reviewed By: NoQ

Subscribers: szepet, rnkovacs, a.sidorin, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333417 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/RegionStore.cpp
test/Analysis/initialization.c
test/Analysis/initialization.cpp [new file with mode: 0644]