]> granicus.if.org Git - clang/commit
[analyzer] Re-enable reasoning about CK_LValueBitCast
authorAnna Zaks <ganna@apple.com>
Tue, 28 May 2013 22:32:08 +0000 (22:32 +0000)
committerAnna Zaks <ganna@apple.com>
Tue, 28 May 2013 22:32:08 +0000 (22:32 +0000)
commit3056439bb175db8c46b89fb4385de8b3a8e42d0d
treee5c44458b3bf58683fe1d633fdf2e09ec95a486c
parentdc0705645276258afddb06cdf0fd7c8840251ee0
[analyzer] Re-enable reasoning about CK_LValueBitCast

It’s important for us to reason about the cast as it is used in std::addressof. The reason we did not
handle the cast previously was a crash on a test case (see commit r157478). The crash was in
processing array to pointer decay when the region type was not an array. Address the issue, by
just returning an unknown in that case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182808 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngineC.cpp
lib/StaticAnalyzer/Core/RegionStore.cpp
test/Analysis/reinterpret-cast.cpp