From 54af503f600d56a22066f66dae4a84418a957b30 Mon Sep 17 00:00:00 2001 From: George Karpenkov Date: Mon, 29 Jan 2018 21:44:49 +0000 Subject: [PATCH] [analyzer] [NFC] Remove unused method visitItemsInWorkList Differential Revision: https://reviews.llvm.org/D42562 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323696 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../Core/PathSensitive/WorkList.h | 8 ----- lib/StaticAnalyzer/Core/CoreEngine.cpp | 33 ------------------- 2 files changed, 41 deletions(-) diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h b/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h index 4f1a60e675..2528aa1b31 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h @@ -80,14 +80,6 @@ public: void setBlockCounter(BlockCounter C) { CurrentCounter = C; } BlockCounter getBlockCounter() const { return CurrentCounter; } - class Visitor { - public: - Visitor() {} - virtual ~Visitor(); - virtual bool visit(const WorkListUnit &U) = 0; - }; - virtual bool visitItemsInWorkList(Visitor &V) = 0; - static WorkList *makeDFS(); static WorkList *makeBFS(); static WorkList *makeBFSBlockDFSContents(); diff --git a/lib/StaticAnalyzer/Core/CoreEngine.cpp b/lib/StaticAnalyzer/Core/CoreEngine.cpp index 3923574500..2fdd310fa3 100644 --- a/lib/StaticAnalyzer/Core/CoreEngine.cpp +++ b/lib/StaticAnalyzer/Core/CoreEngine.cpp @@ -37,8 +37,6 @@ STATISTIC(NumPathsExplored, // Worklist classes for exploration of reachable states. //===----------------------------------------------------------------------===// -WorkList::Visitor::~Visitor() {} - namespace { class DFS : public WorkList { SmallVector Stack; @@ -57,15 +55,6 @@ public: Stack.pop_back(); // This technically "invalidates" U, but we are fine. return U; } - - bool visitItemsInWorkList(Visitor &V) override { - for (SmallVectorImpl::iterator - I = Stack.begin(), E = Stack.end(); I != E; ++I) { - if (V.visit(*I)) - return true; - } - return false; - } }; class BFS : public WorkList { @@ -85,14 +74,6 @@ public: return U; } - bool visitItemsInWorkList(Visitor &V) override { - for (std::deque::iterator - I = Queue.begin(), E = Queue.end(); I != E; ++I) { - if (V.visit(*I)) - return true; - } - return false; - } }; } // end anonymous namespace @@ -135,20 +116,6 @@ namespace { Queue.pop_front(); return U; } - bool visitItemsInWorkList(Visitor &V) override { - for (SmallVectorImpl::iterator - I = Stack.begin(), E = Stack.end(); I != E; ++I) { - if (V.visit(*I)) - return true; - } - for (std::deque::iterator - I = Queue.begin(), E = Queue.end(); I != E; ++I) { - if (V.visit(*I)) - return true; - } - return false; - } - }; } // end anonymous namespace -- 2.40.0