[clang] ef156f9 - [clang][dataflow] Remove unused private field 'StmtToEnv' (NFC)

Jie Fu via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 12 00:26:50 PST 2024


Author: Jie Fu
Date: 2024-01-12T16:26:00+08:00
New Revision: ef156f91262e960eea5ca93f95dd6111cfa3c5cc

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

LOG: [clang][dataflow] Remove unused private field 'StmtToEnv' (NFC)

llvm-project/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:148:23:
 error: private field 'StmtToEnv' is not used [-Werror,-Wunused-private-field]
  148 |   const StmtToEnvMap &StmtToEnv;
      |                       ^
1 error generated.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
index fdb2aeacf063ab..24d1447f09794a 100644
--- a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
+++ b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
@@ -77,7 +77,7 @@ class TerminatorVisitor
 public:
   TerminatorVisitor(const StmtToEnvMap &StmtToEnv, Environment &Env,
                     int BlockSuccIdx)
-      : StmtToEnv(StmtToEnv), Env(Env), BlockSuccIdx(BlockSuccIdx) {}
+      : Env(Env), BlockSuccIdx(BlockSuccIdx) {}
 
   TerminatorVisitorRetTy VisitIfStmt(const IfStmt *S) {
     auto *Cond = S->getCond();
@@ -145,7 +145,6 @@ class TerminatorVisitor
     return {&Cond, ConditionValue};
   }
 
-  const StmtToEnvMap &StmtToEnv;
   Environment &Env;
   int BlockSuccIdx;
 };


        


More information about the cfe-commits mailing list