diff options
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp b/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp index 3ba063d..0d683f9 100644 --- a/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp @@ -136,9 +136,9 @@ void CastSizeChecker::checkPreStmt(const CastExpr *CE,CheckerContext &C) const { BT.reset(new BuiltinBug(this, "Cast region with wrong size.", "Cast a region whose size is not a multiple" " of the destination type size.")); - BugReport *R = new BugReport(*BT, BT->getDescription(), errorNode); + auto R = llvm::make_unique<BugReport>(*BT, BT->getDescription(), errorNode); R->addRange(CE->getSourceRange()); - C.emitReport(R); + C.emitReport(std::move(R)); } } |