From c192b3dcffd5e672a2b2e1730e2440febb4fb192 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 5 Jul 2015 14:23:59 +0000 Subject: Vendor import of clang trunk r241361: https://llvm.org/svn/llvm-project/cfe/trunk@241361 --- lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp') diff --git a/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp b/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp index e952671efffc..ba4daf835148 100644 --- a/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp @@ -53,10 +53,10 @@ UndefinedArraySubscriptChecker::checkPreStmt(const ArraySubscriptExpr *A, BT.reset(new BuiltinBug(this, "Array subscript is undefined")); // Generate a report for this bug. - BugReport *R = new BugReport(*BT, BT->getName(), N); + auto R = llvm::make_unique(*BT, BT->getName(), N); R->addRange(A->getIdx()->getSourceRange()); bugreporter::trackNullOrUndefValue(N, A->getIdx(), *R); - C.emitReport(R); + C.emitReport(std::move(R)); } void ento::registerUndefinedArraySubscriptChecker(CheckerManager &mgr) { -- cgit v1.2.3