forked from OSchip/llvm-project
[analyzer] [NFC] Dead code removal
Differential Revision: https://reviews.llvm.org/D52269 llvm-svn: 342765
This commit is contained in:
parent
546de61000
commit
649e013241
|
@ -65,8 +65,6 @@ public:
|
|||
/// by a sink node.
|
||||
bool isSuppressOnSink() const { return SuppressOnSink; }
|
||||
void setSuppressOnSink(bool x) { SuppressOnSink = x; }
|
||||
|
||||
virtual void FlushReports(BugReporter& BR);
|
||||
};
|
||||
|
||||
class BuiltinBug : public BugType {
|
||||
|
|
|
@ -162,10 +162,6 @@ public:
|
|||
return getSValBuilder().getSymbolManager();
|
||||
}
|
||||
|
||||
bool isObjCGCEnabled() const {
|
||||
return Eng.isObjCGCEnabled();
|
||||
}
|
||||
|
||||
ProgramStateManager &getStateManager() {
|
||||
return Eng.getStateManager();
|
||||
}
|
||||
|
|
|
@ -141,9 +141,6 @@ private:
|
|||
/// implicitly never returns.
|
||||
ObjCNoReturn ObjCNoRet;
|
||||
|
||||
/// Whether or not GC is enabled in this analysis.
|
||||
bool ObjCGCEnabled;
|
||||
|
||||
/// The BugReporter associated with this engine. It is important that
|
||||
/// this object be placed at the very end of member variables so that its
|
||||
/// destructor is called before the rest of the ExprEngine is destroyed.
|
||||
|
@ -201,8 +198,6 @@ public:
|
|||
return *currBldrCtx;
|
||||
}
|
||||
|
||||
bool isObjCGCEnabled() { return ObjCGCEnabled; }
|
||||
|
||||
const Stmt *getStmt() const;
|
||||
|
||||
void GenerateAutoTransition(ExplodedNode *N);
|
||||
|
|
|
@ -2023,8 +2023,6 @@ static std::unique_ptr<PathDiagnostic> generatePathDiagnosticForConsumer(
|
|||
|
||||
void BugType::anchor() {}
|
||||
|
||||
void BugType::FlushReports(BugReporter &BR) {}
|
||||
|
||||
void BuiltinBug::anchor() {}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -2253,14 +2251,6 @@ void BugReporter::FlushReports() {
|
|||
if (BugTypes.isEmpty())
|
||||
return;
|
||||
|
||||
// First flush the warnings for each BugType. This may end up creating new
|
||||
// warnings and new BugTypes.
|
||||
// FIXME: Only NSErrorChecker needs BugType's FlushReports.
|
||||
// Turn NSErrorChecker into a proper checker and remove this.
|
||||
SmallVector<const BugType *, 16> bugTypes(BugTypes.begin(), BugTypes.end());
|
||||
for (const auto I : bugTypes)
|
||||
const_cast<BugType*>(I)->FlushReports(*this);
|
||||
|
||||
// We need to flush reports in deterministic order to ensure the order
|
||||
// of the reports is consistent between runs.
|
||||
for (const auto EQ : EQClassesVector)
|
||||
|
|
|
@ -189,7 +189,7 @@ ExprEngine::ExprEngine(cross_tu::CrossTranslationUnitContext &CTU,
|
|||
this),
|
||||
SymMgr(StateMgr.getSymbolManager()),
|
||||
svalBuilder(StateMgr.getSValBuilder()), ObjCNoRet(mgr.getASTContext()),
|
||||
ObjCGCEnabled(gcEnabled), BR(mgr, *this),
|
||||
BR(mgr, *this),
|
||||
VisitedCallees(VisitedCalleesIn), HowToInline(HowToInlineIn) {
|
||||
unsigned TrimInterval = mgr.options.getGraphTrimInterval();
|
||||
if (TrimInterval != 0) {
|
||||
|
@ -3184,11 +3184,6 @@ void ExprEngine::ViewGraph(bool trim) {
|
|||
if (trim) {
|
||||
std::vector<const ExplodedNode *> Src;
|
||||
|
||||
// Flush any outstanding reports to make sure we cover all the nodes.
|
||||
// This does not cause them to get displayed.
|
||||
for (const auto I : BR)
|
||||
const_cast<BugType *>(I)->FlushReports(BR);
|
||||
|
||||
// Iterate through the reports and get their nodes.
|
||||
for (BugReporter::EQClasses_iterator
|
||||
EI = BR.EQClasses_begin(), EE = BR.EQClasses_end(); EI != EE; ++EI) {
|
||||
|
|
Loading…
Reference in New Issue