[clang] 266c12a - [clang][dataflow] When dumping `ExprToVal`, dump the `Value`, not just its location.

Martin Braenne via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 4 00:38:41 PDT 2023


Author: Martin Braenne
Date: 2023-09-04T07:38:33Z
New Revision: 266c12a1bd603fa3ecbf26a6f93621f0f8488da1

URL: https://github.com/llvm/llvm-project/commit/266c12a1bd603fa3ecbf26a6f93621f0f8488da1
DIFF: https://github.com/llvm/llvm-project/commit/266c12a1bd603fa3ecbf26a6f93621f0f8488da1.diff

LOG: [clang][dataflow] When dumping `ExprToVal`, dump the `Value`, not just its location.

This makes `ExprToVal` dumping consistent with `LocToVal` dumping.

Reviewed By: ymandel, xazax.hun

Differential Revision: https://reviews.llvm.org/D159274

Added: 
    

Modified: 
    clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
index f15ea52d6b4699..b40fbbc991c8f8 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
@@ -918,7 +918,7 @@ void Environment::dump(raw_ostream &OS) const {
 
   OS << "ExprToVal:\n";
   for (auto [E, V] : ExprToVal)
-    OS << "  [" << E << ", " << V << "]\n";
+    OS << "  [" << E << ", " << V << ": " << *V << "]\n";
 
   OS << "LocToVal:\n";
   for (auto [L, V] : LocToVal) {


        


More information about the cfe-commits mailing list