summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2017-12-05 17:14:39 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2017-12-05 17:14:39 +0000
commit748d8a28ef21890efd1aa4daa74af1bcac52d8a1 (patch)
tree75ba3b584e3bfa5a5ce8a2cadb9fbbb6742b63c2 /clang/lib/StaticAnalyzer/Core/MemRegion.cpp
parent056774d13b0f61d19d2c73302bde01261b9ec9c6 (diff)
downloadbcm5719-llvm-748d8a28ef21890efd1aa4daa74af1bcac52d8a1.tar.gz
bcm5719-llvm-748d8a28ef21890efd1aa4daa74af1bcac52d8a1.zip
[analyzer] Mark heap-based symbolic regions in debug dumps.
They are now printed as HeapSymRegion{$x} in order to discriminate between that and regular SymRegion{$x}, which are two different regions, having different parent reginos (memory spaces) - HeapSpaceRegion and UnknownSpaceRegion respectively. Differential Revision: https://reviews.llvm.org/D40793 llvm-svn: 319793
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/MemRegion.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/MemRegion.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
index 640e63d137b..cb8ba6de362 100644
--- a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
+++ b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
@@ -472,6 +472,8 @@ void ObjCStringRegion::dumpToStream(raw_ostream &os) const {
}
void SymbolicRegion::dumpToStream(raw_ostream &os) const {
+ if (isa<HeapSpaceRegion>(getSuperRegion()))
+ os << "Heap";
os << "SymRegion{" << sym << '}';
}
OpenPOWER on IntegriCloud