summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index b26a4fe4df0..447e66dfe7b 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -1732,13 +1732,13 @@ namespace {
const ExplodedNode *N,
BugReport &BR) override;
- BugReporterVisitor *clone() const override {
+ std::unique_ptr<BugReporterVisitor> clone() const override {
// The curiously-recurring template pattern only works for one level of
// subclassing. Rather than make a new template base for
// CFRefReportVisitor, we simply override clone() to do the right thing.
// This could be trouble someday if BugReporterVisitorImpl is ever
// used for something else besides a convenient implementation of clone().
- return new CFRefLeakReportVisitor(*this);
+ return llvm::make_unique<CFRefLeakReportVisitor>(*this);
}
};
@@ -1751,7 +1751,7 @@ namespace {
bool registerVisitor = true)
: BugReport(D, D.getDescription(), n) {
if (registerVisitor)
- addVisitor(new CFRefReportVisitor(sym, GCEnabled, Log));
+ addVisitor(llvm::make_unique<CFRefReportVisitor>(sym, GCEnabled, Log));
addGCModeDescription(LOpts, GCEnabled);
}
@@ -1759,7 +1759,7 @@ namespace {
const SummaryLogTy &Log, ExplodedNode *n, SymbolRef sym,
StringRef endText)
: BugReport(D, D.getDescription(), endText, n) {
- addVisitor(new CFRefReportVisitor(sym, GCEnabled, Log));
+ addVisitor(llvm::make_unique<CFRefReportVisitor>(sym, GCEnabled, Log));
addGCModeDescription(LOpts, GCEnabled);
}
@@ -2387,7 +2387,7 @@ CFRefLeakReport::CFRefLeakReport(CFRefBug &D, const LangOptions &LOpts,
}
}
- addVisitor(new CFRefLeakReportVisitor(sym, GCEnabled, Log));
+ addVisitor(llvm::make_unique<CFRefLeakReportVisitor>(sym, GCEnabled, Log));
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud