diff options
| author | George Karpenkov <ekarpenkov@apple.com> | 2018-06-26 23:10:05 +0000 |
|---|---|---|
| committer | George Karpenkov <ekarpenkov@apple.com> | 2018-06-26 23:10:05 +0000 |
| commit | 32919a58612669d472bc6d88a80aaf54c20016d1 (patch) | |
| tree | 173f7dc7d4ab639ac9157ca9561a374c1290d9d8 /clang/lib/StaticAnalyzer | |
| parent | b9c1a234d2c8a3f82d4d45b74bc1ea90bcb79195 (diff) | |
| download | bcm5719-llvm-32919a58612669d472bc6d88a80aaf54c20016d1.tar.gz bcm5719-llvm-32919a58612669d472bc6d88a80aaf54c20016d1.zip | |
[analyzer] Minor cleanups for BugReporter, expose a getter for AnalyzerOptions.
llvm-svn: 335683
Diffstat (limited to 'clang/lib/StaticAnalyzer')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index cd134123015..a4ac93d59b3 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -769,8 +769,7 @@ public: // If we have counter-suppression enabled, make sure we keep visiting // future nodes. We want to emit a path note as well, in case // the report is resurrected as valid later on. - ExprEngine &Eng = BRC.getBugReporter().getEngine(); - AnalyzerOptions &Options = Eng.getAnalysisManager().options; + AnalyzerOptions &Options = BRC.getAnalyzerOptions(); if (EnableNullFPSuppression && hasCounterSuppression(Options)) Mode = MaybeUnsuppress; @@ -808,8 +807,7 @@ public: visitNodeMaybeUnsuppress(const ExplodedNode *N, const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) { #ifndef NDEBUG - ExprEngine &Eng = BRC.getBugReporter().getEngine(); - AnalyzerOptions &Options = Eng.getAnalysisManager().options; + AnalyzerOptions &Options = BRC.getAnalyzerOptions(); assert(hasCounterSuppression(Options)); #endif @@ -1756,11 +1754,8 @@ ConditionBRVisitor::VisitNodeImpl(const ExplodedNode *N, } if (Optional<PostStmt> PS = progPoint.getAs<PostStmt>()) { - // FIXME: Assuming that BugReporter is a GRBugReporter is a layering - // violation. const std::pair<const ProgramPointTag *, const ProgramPointTag *> &tags = - cast<GRBugReporter>(BRC.getBugReporter()). - getEngine().geteagerlyAssumeBinOpBifurcationTags(); + ExprEngine::geteagerlyAssumeBinOpBifurcationTags(); const ProgramPointTag *tag = PS->getTag(); if (tag == tags.first) @@ -2152,8 +2147,7 @@ void LikelyFalsePositiveSuppressionBRVisitor::finalizeVisitor( BugReporterContext &BRC, const ExplodedNode *N, BugReport &BR) { // Here we suppress false positives coming from system headers. This list is // based on known issues. - ExprEngine &Eng = BRC.getBugReporter().getEngine(); - AnalyzerOptions &Options = Eng.getAnalysisManager().options; + AnalyzerOptions &Options = BRC.getAnalyzerOptions(); const Decl *D = N->getLocationContext()->getDecl(); if (AnalysisDeclContext::isInStdNamespace(D)) { |

