r319793 - [analyzer] Mark heap-based symbolic regions in debug dumps.

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 09:14:39 PST 2017


Author: dergachev
Date: Tue Dec  5 09:14:39 2017
New Revision: 319793

URL: http://llvm.org/viewvc/llvm-project?rev=319793&view=rev
Log:
[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

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp?rev=319793&r1=319792&r2=319793&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp Tue Dec  5 09:14:39 2017
@@ -472,6 +472,8 @@ void ObjCStringRegion::dumpToStream(raw_
 }
 
 void SymbolicRegion::dumpToStream(raw_ostream &os) const {
+  if (isa<HeapSpaceRegion>(getSuperRegion()))
+    os << "Heap";
   os << "SymRegion{" << sym << '}';
 }
 




More information about the cfe-commits mailing list