diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-01-09 18:46:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-01-09 18:46:17 +0000 |
commit | beac9e3772e255f89dad0abe34811953121912b2 (patch) | |
tree | 859e27aef3dc40f4b65c66962d00aa878c8f17a6 /lib/StaticAnalyzer/Core/RegionStore.cpp | |
parent | 719e53f64637c5ac41aac0c711e1977487ffc0d7 (diff) |
Do not model loads from complex types, since we don't accurately model the imaginary and real parts yet.
Fixes false positive reported in <rdar://problem/12964481>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/RegionStore.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/RegionStore.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/RegionStore.cpp b/lib/StaticAnalyzer/Core/RegionStore.cpp index 9d66c16e73..ffdb97197f 100644 --- a/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -1133,6 +1133,11 @@ SVal RegionStoreManager::getBinding(RegionBindingsConstRef B, Loc L, QualType T) const TypedValueRegion *R = cast<TypedValueRegion>(MR); QualType RTy = R->getValueType(); + // FIXME: we do not yet model the parts of a complex type, so treat the + // whole thing as "unknown". + if (RTy->isAnyComplexType()) + return UnknownVal(); + // FIXME: We should eventually handle funny addressing. e.g.: // // int x = ...; |