diff options
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)) { | 

