diff options
Diffstat (limited to 'examples/analyzer-plugin/MainCallChecker.cpp')
-rw-r--r-- | examples/analyzer-plugin/MainCallChecker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/analyzer-plugin/MainCallChecker.cpp b/examples/analyzer-plugin/MainCallChecker.cpp index 2ad8c84..a6f69fd 100644 --- a/examples/analyzer-plugin/MainCallChecker.cpp +++ b/examples/analyzer-plugin/MainCallChecker.cpp @@ -37,9 +37,10 @@ void MainCallChecker::checkPreStmt(const CallExpr *CE, CheckerContext &C) const if (!BT) BT.reset(new BugType(this, "call to main", "example analyzer plugin")); - BugReport *report = new BugReport(*BT, BT->getName(), N); + std::unique_ptr<BugReport> report = + llvm::make_unique<BugReport>(*BT, BT->getName(), N); report->addRange(Callee->getSourceRange()); - C.emitReport(report); + C.emitReport(std::move(report)); } } |