diff options
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp b/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp index cb5b010..557439b 100644 --- a/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp @@ -76,11 +76,10 @@ void ArrayBoundChecker::checkLocation(SVal l, bool isLoad, const Stmt* LoadS, // reference is outside the range. // Generate a report for this bug. - BugReport *report = - new BugReport(*BT, BT->getDescription(), N); + auto report = llvm::make_unique<BugReport>(*BT, BT->getDescription(), N); report->addRange(LoadS->getSourceRange()); - C.emitReport(report); + C.emitReport(std::move(report)); return; } |