[PATCH] D42562: [analyzer] [NFC] Remove unused method visitItemsInWorkList and the corresponding interface
George Karpenkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 29 13:46:35 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL323696: [analyzer] [NFC] Remove unused method visitItemsInWorkList (authored by george.karpenkov, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D42562?vs=131530&id=131870#toc
Repository:
rL LLVM
https://reviews.llvm.org/D42562
Files:
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
Index: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
===================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
@@ -80,14 +80,6 @@
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();
Index: cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
@@ -37,8 +37,6 @@
// Worklist classes for exploration of reachable states.
//===----------------------------------------------------------------------===//
-WorkList::Visitor::~Visitor() {}
-
namespace {
class DFS : public WorkList {
SmallVector<WorkListUnit,20> Stack;
@@ -57,15 +55,6 @@
Stack.pop_back(); // This technically "invalidates" U, but we are fine.
return U;
}
-
- bool visitItemsInWorkList(Visitor &V) override {
- for (SmallVectorImpl<WorkListUnit>::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 @@
return U;
}
- bool visitItemsInWorkList(Visitor &V) override {
- for (std::deque<WorkListUnit>::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 @@
Queue.pop_front();
return U;
}
- bool visitItemsInWorkList(Visitor &V) override {
- for (SmallVectorImpl<WorkListUnit>::iterator
- I = Stack.begin(), E = Stack.end(); I != E; ++I) {
- if (V.visit(*I))
- return true;
- }
- for (std::deque<WorkListUnit>::iterator
- I = Queue.begin(), E = Queue.end(); I != E; ++I) {
- if (V.visit(*I))
- return true;
- }
- return false;
- }
-
};
} // end anonymous namespace
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42562.131870.patch
Type: text/x-patch
Size: 2492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180129/88b62ab2/attachment.bin>
More information about the llvm-commits
mailing list