diff options
| author | George Karpenkov <ekarpenkov@apple.com> | 2018-09-21 20:35:39 +0000 |
|---|---|---|
| committer | George Karpenkov <ekarpenkov@apple.com> | 2018-09-21 20:35:39 +0000 |
| commit | 649e013241051b9e4ee972aee3313536fb04017a (patch) | |
| tree | 4c1cb6f5bdc38af20e439f0b2686fc74506b6fdb /clang/lib | |
| parent | 546de61000835e41db6398413c0275f84b4f9860 (diff) | |
| download | bcm5719-llvm-649e013241051b9e4ee972aee3313536fb04017a.tar.gz bcm5719-llvm-649e013241051b9e4ee972aee3313536fb04017a.zip | |
[analyzer] [NFC] Dead code removal
Differential Revision: https://reviews.llvm.org/D52269
llvm-svn: 342765
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 10 | ||||
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 7 |
2 files changed, 1 insertions, 16 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index c703294eb97..483fb50d00c 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -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) diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index fdc0b03d0f2..bf2fc56b15d 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -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) { |

