diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:35 +0000 |
commit | 6694ed095d6b27a2c92ec4fd63664fcd88a05749 (patch) | |
tree | 0633c29bd8350e306f3a24a30f3f6045efd35420 /lib/StaticAnalyzer/Checkers/MPI-Checker | |
parent | d5dc75c5cf109efe52b1da32ec44a667389a0f0a (diff) |
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MPI-Checker')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp | 10 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp b/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp index d56ea6d689d3..e9ec7a0c4365 100644 --- a/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp +++ b/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp @@ -85,9 +85,11 @@ void MPIBugReporter::reportUnmatchedWait( BReporter.emitReport(std::move(Report)); } -PathDiagnosticPiece *MPIBugReporter::RequestNodeVisitor::VisitNode( - const ExplodedNode *N, const ExplodedNode *PrevN, BugReporterContext &BRC, - BugReport &BR) { +std::shared_ptr<PathDiagnosticPiece> +MPIBugReporter::RequestNodeVisitor::VisitNode(const ExplodedNode *N, + const ExplodedNode *PrevN, + BugReporterContext &BRC, + BugReport &BR) { if (IsNodeFound) return nullptr; @@ -104,7 +106,7 @@ PathDiagnosticPiece *MPIBugReporter::RequestNodeVisitor::VisitNode( PathDiagnosticLocation L = PathDiagnosticLocation::create(P, BRC.getSourceManager()); - return new PathDiagnosticEventPiece(L, ErrorText); + return std::make_shared<PathDiagnosticEventPiece>(L, ErrorText); } return nullptr; diff --git a/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h b/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h index 8474d2d194e8..0ee91cca4793 100644 --- a/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h +++ b/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h @@ -90,10 +90,10 @@ private: ID.AddPointer(RequestRegion); } - PathDiagnosticPiece *VisitNode(const ExplodedNode *N, - const ExplodedNode *PrevN, - BugReporterContext &BRC, - BugReport &BR) override; + std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, + const ExplodedNode *PrevN, + BugReporterContext &BRC, + BugReport &BR) override; private: const MemRegion *const RequestRegion; |