llvm/clang/lib/StaticAnalyzer/Core/WorkList.cpp

//===- WorkList.cpp - Analyzer work-list implementation--------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Defines different worklist implementations for the static analyzer.
//
//===----------------------------------------------------------------------===//

#include "clang/StaticAnalyzer/Core/PathSensitive/WorkList.h"
#include "llvm/ADT/PriorityQueue.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include <deque>
#include <vector>

usingnamespaceclang;
usingnamespaceento;

#define DEBUG_TYPE

STATISTIC(MaxQueueSize, "Maximum size of the worklist");
STATISTIC(MaxReachableSize, "Maximum size of auxiliary worklist set");

//===----------------------------------------------------------------------===//
// Worklist classes for exploration of reachable states.
//===----------------------------------------------------------------------===//

namespace {

class DFS : public WorkList {};

class BFS : public WorkList {};

} // namespace

// Place the dstor for WorkList here because it contains virtual member
// functions, and we the code for the dstor generated in one compilation unit.
WorkList::~WorkList() = default;

std::unique_ptr<WorkList> WorkList::makeDFS() {}

std::unique_ptr<WorkList> WorkList::makeBFS() {}

namespace {

  class BFSBlockDFSContents : public WorkList {};

} // namespace

std::unique_ptr<WorkList> WorkList::makeBFSBlockDFSContents() {}

namespace {

class UnexploredFirstStack : public WorkList {};

} // namespace

std::unique_ptr<WorkList> WorkList::makeUnexploredFirst() {}

namespace {
class UnexploredFirstPriorityQueue : public WorkList {};
} // namespace

std::unique_ptr<WorkList> WorkList::makeUnexploredFirstPriorityQueue() {}

namespace {
class UnexploredFirstPriorityLocationQueue : public WorkList {};

}

std::unique_ptr<WorkList> WorkList::makeUnexploredFirstPriorityLocationQueue() {}