diff options
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp b/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp index d765315..ba3024d 100644 --- a/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp @@ -63,9 +63,9 @@ void CastToStructChecker::checkPreStmt(const CastExpr *CE, "Casting a non-structure type to a structure type " "and accessing a field can lead to memory access " "errors or data corruption.")); - BugReport *R = new BugReport(*BT,BT->getDescription(), N); + auto R = llvm::make_unique<BugReport>(*BT, BT->getDescription(), N); R->addRange(CE->getSourceRange()); - C.emitReport(R); + C.emitReport(std::move(R)); } } } |