diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
commit | c192b3dcffd5e672a2b2e1730e2440febb4fb192 (patch) | |
tree | ac719b5984165053bf83d71142e4d96b609b9784 /lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp | |
parent | 2e645aa5697838f16ec570eb07c2bee7e13d0e0b (diff) |
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp b/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp index fbf2d73dd86c4..a7b92b4c67f27 100644 --- a/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp @@ -47,10 +47,10 @@ void ObjCAtSyncChecker::checkPreStmt(const ObjCAtSynchronizedStmt *S, if (!BT_undef) BT_undef.reset(new BuiltinBug(this, "Uninitialized value used as mutex " "for @synchronized")); - BugReport *report = - new BugReport(*BT_undef, BT_undef->getDescription(), N); + auto report = + llvm::make_unique<BugReport>(*BT_undef, BT_undef->getDescription(), N); bugreporter::trackNullOrUndefValue(N, Ex, *report); - C.emitReport(report); + C.emitReport(std::move(report)); } return; } @@ -71,11 +71,11 @@ void ObjCAtSyncChecker::checkPreStmt(const ObjCAtSynchronizedStmt *S, BT_null.reset(new BuiltinBug( this, "Nil value used as mutex for @synchronized() " "(no synchronization will occur)")); - BugReport *report = - new BugReport(*BT_null, BT_null->getDescription(), N); + auto report = + llvm::make_unique<BugReport>(*BT_null, BT_null->getDescription(), N); bugreporter::trackNullOrUndefValue(N, Ex, *report); - C.emitReport(report); + C.emitReport(std::move(report)); return; } } |