]> granicus.if.org Git - clang/commit
Add corner case logic to BasicStoreManager and GRSimpleVals::EvalBinOp to enable
authorTed Kremenek <kremenek@apple.com>
Wed, 29 Apr 2009 16:03:27 +0000 (16:03 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 29 Apr 2009 16:03:27 +0000 (16:03 +0000)
commit5fa93d5285ed68a0819521f4681755ae696b996f
treeb907cbacd13d6a1b66ae35b04df8e6820b515546
parent82539b09e33914861a60f0947500741ace409eb5
Add corner case logic to BasicStoreManager and GRSimpleVals::EvalBinOp to enable
reasoning about OSCompareAndSwap32Barrier/OSCompareAndSwap64Barrier. Essentially
the address of reference to a region (pointer-to-pointer) can be casted to
(int32_t*), and we need to handle the logic to convert the involved locations
back and forth from nonloc::LocAsInteger, nonloc::ConcreteInt, to Loc and
loc::ConcreteInt respectively. This adds some potentially suspect logic to
BasicStoreManager that allows the analyzer to reason about abuses of the C type
system. This should probably be refined, be ported over to RegionStoreManager,
and extended with "path-sensitive type checking" to flag bugs in clearly
incoherent code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70382 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/BasicStore.cpp
lib/Analysis/GRSimpleVals.cpp