summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp10
1 files changed, 6 insertions, 4 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;