[PATCH] D62658: [analyzer] print() JSONify: ExplodedNode revision

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 30 06:41:45 PDT 2019


Charusso created this revision.
Charusso added reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus.
Charusso added a project: clang.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet.

Revert node-ID removal.


Repository:
  rC Clang

https://reviews.llvm.org/D62658

Files:
  clang/lib/StaticAnalyzer/Core/ExprEngine.cpp


Index: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -3075,8 +3075,8 @@
     const unsigned int Space = 1;
     ProgramStateRef State = N->getState();
 
-    Out << "{ \"node_id\": \"" << (const void *)N
-        << "\", \"state_id\": " << State->getID()
+    Out << "{ \"node_id\": " << N->getID(G) << ", \"pointer\": \""
+        << (const void *)N << "\", \"state_id\": " << State->getID()
         << ", \"has_report\": " << (nodeHasBugReport(N) ? "true" : "false")
         << ",\\l";
 
@@ -3094,7 +3094,7 @@
           else
             Out << "null }";
         },
-	// Adds a comma and a new-line between each program point.
+        // Adds a comma and a new-line between each program point.
         [&](const ExplodedNode *) { Out << ",\\l"; },
         [&](const ExplodedNode *) { return false; });
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62658.202173.patch
Type: text/x-patch
Size: 981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190530/1c212c9f/attachment.bin>


More information about the cfe-commits mailing list