#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/AST/ParentMap.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/SourceManager.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "llvm/ADT/SmallSet.h"
#include <optional>
usingnamespaceclang;
usingnamespaceento;
namespace {
class UnreachableCodeChecker : public Checker<check::EndAnalysis> { … };
}
void UnreachableCodeChecker::checkEndAnalysis(ExplodedGraph &G,
BugReporter &B,
ExprEngine &Eng) const { … }
void UnreachableCodeChecker::FindUnreachableEntryPoints(const CFGBlock *CB,
CFGBlocksSet &reachable,
CFGBlocksSet &visited) { … }
const Stmt *UnreachableCodeChecker::getUnreachableStmt(const CFGBlock *CB) { … }
bool UnreachableCodeChecker::isInvalidPath(const CFGBlock *CB,
const ParentMap &PM) { … }
bool UnreachableCodeChecker::isEmptyCFGBlock(const CFGBlock *CB) { … }
void ento::registerUnreachableCodeChecker(CheckerManager &mgr) { … }
bool ento::shouldRegisterUnreachableCodeChecker(const CheckerManager &mgr) { … }