Author: Gabor Marton Date: 2022-10-26T17:28:56+02:00 New Revision: 5bd142ca265d8243ecebb63ffed0c7afd3abf440
URL: https://github.com/llvm/llvm-project/commit/5bd142ca265d8243ecebb63ffed0c7afd3abf440 DIFF: https://github.com/llvm/llvm-project/commit/5bd142ca265d8243ecebb63ffed0c7afd3abf440.diff LOG: [clang][dataflow] Remove unused 'Analysis' field from 'TerminatorVisitor' This is to silence the warning: private field 'Analysis' is not used 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 ec6a8a3d2e525..11ebf4e986f62 100644 --- a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp +++ b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp @@ -80,10 +80,9 @@ using TerminatorVisitorRetTy = std::pair<const Expr *, bool>; class TerminatorVisitor : public ConstStmtVisitor<TerminatorVisitor, TerminatorVisitorRetTy> { public: - TerminatorVisitor(TypeErasedDataflowAnalysis &Analysis, - const StmtToEnvMap &StmtToEnv, Environment &Env, + TerminatorVisitor(const StmtToEnvMap &StmtToEnv, Environment &Env, int BlockSuccIdx, TransferOptions TransferOpts) - : Analysis(Analysis), StmtToEnv(StmtToEnv), Env(Env), + : StmtToEnv(StmtToEnv), Env(Env), BlockSuccIdx(BlockSuccIdx), TransferOpts(TransferOpts) {} TerminatorVisitorRetTy VisitIfStmt(const IfStmt *S) { @@ -162,7 +161,6 @@ class TerminatorVisitor return {&Cond, ConditionValue}; } - TypeErasedDataflowAnalysis &Analysis; const StmtToEnvMap &StmtToEnv; Environment &Env; int BlockSuccIdx; @@ -255,7 +253,7 @@ computeBlockInputState(const CFGBlock &Block, AnalysisContext &AC) { if (const Stmt *PredTerminatorStmt = Pred->getTerminatorStmt()) { const StmtToEnvMapImpl StmtToEnv(AC.CFCtx, AC.BlockStates); auto [Cond, CondValue] = - TerminatorVisitor(Analysis, StmtToEnv, PredState.Env, + TerminatorVisitor(StmtToEnv, PredState.Env, blockIndexInPredecessor(*Pred, Block), *BuiltinTransferOpts) .Visit(PredTerminatorStmt); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits