diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:09 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:09 +0000 |
| commit | f0c55418e2b09eaab37c820d3756cc1b4584d084 (patch) | |
| tree | 9263bf60f263bb5a7aaa4d2c1be43e5fc4d942e0 /lib/StaticAnalyzer/Core/RegionStore.cpp | |
| parent | 583e75cce441388bc562fa225d23499261a0091e (diff) | |
Notes
Diffstat (limited to 'lib/StaticAnalyzer/Core/RegionStore.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Core/RegionStore.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/RegionStore.cpp b/lib/StaticAnalyzer/Core/RegionStore.cpp index dd7e9dd11781..3000e13d32c6 100644 --- a/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -1338,6 +1338,9 @@ RegionStoreManager::getSizeInElements(ProgramStateRef state, /// the array). This is called by ExprEngine when evaluating casts /// from arrays to pointers. SVal RegionStoreManager::ArrayToPointer(Loc Array, QualType T) { + if (Array.getAs<loc::ConcreteInt>()) + return Array; + if (!Array.getAs<loc::MemRegionVal>()) return UnknownVal(); |
