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/BasicObjCFoundationChecks.cpp | |
parent | 2e645aa5697838f16ec570eb07c2bee7e13d0e0b (diff) | |
download | src-c192b3dcffd5e672a2b2e1730e2440febb4fb192.tar.gz src-c192b3dcffd5e672a2b2e1730e2440febb4fb192.zip |
Vendor import of clang trunk r241361:vendor/clang/clang-trunk-r241361
Notes
Notes:
svn path=/vendor/clang/dist/; revision=285165
svn path=/vendor/clang/clang-trunk-r241361/; revision=285166; tag=vendor/clang/clang-trunk-r241361
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp index 3fd55760bc5f..f763284aa2c9 100644 --- a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp +++ b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp @@ -207,10 +207,10 @@ void NilArgChecker::generateBugReport(ExplodedNode *N, if (!BT) BT.reset(new APIMisuse(this, "nil argument")); - BugReport *R = new BugReport(*BT, Msg, N); + auto R = llvm::make_unique<BugReport>(*BT, Msg, N); R->addRange(Range); bugreporter::trackNullOrUndefValue(N, E, *R); - C.emitReport(R); + C.emitReport(std::move(R)); } void NilArgChecker::checkPreObjCMessage(const ObjCMethodCall &msg, @@ -516,9 +516,9 @@ void CFNumberCreateChecker::checkPreStmt(const CallExpr *CE, if (!BT) BT.reset(new APIMisuse(this, "Bad use of CFNumberCreate")); - BugReport *report = new BugReport(*BT, os.str(), N); + auto report = llvm::make_unique<BugReport>(*BT, os.str(), N); report->addRange(CE->getArg(2)->getSourceRange()); - C.emitReport(report); + C.emitReport(std::move(report)); } } @@ -605,10 +605,10 @@ void CFRetainReleaseChecker::checkPreStmt(const CallExpr *CE, else llvm_unreachable("impossible case"); - BugReport *report = new BugReport(*BT, description, N); + auto report = llvm::make_unique<BugReport>(*BT, description, N); report->addRange(Arg->getSourceRange()); bugreporter::trackNullOrUndefValue(N, Arg, *report); - C.emitReport(report); + C.emitReport(std::move(report)); return; } @@ -666,9 +666,9 @@ void ClassReleaseChecker::checkPreObjCMessage(const ObjCMethodCall &msg, "of class '" << Class->getName() << "' and not the class directly"; - BugReport *report = new BugReport(*BT, os.str(), N); + auto report = llvm::make_unique<BugReport>(*BT, os.str(), N); report->addRange(msg.getSourceRange()); - C.emitReport(report); + C.emitReport(std::move(report)); } } @@ -819,9 +819,9 @@ void VariadicMethodTypeChecker::checkPreObjCMessage(const ObjCMethodCall &msg, ArgTy.print(os, C.getLangOpts()); os << "'"; - BugReport *R = new BugReport(*BT, os.str(), errorNode.getValue()); + auto R = llvm::make_unique<BugReport>(*BT, os.str(), errorNode.getValue()); R->addRange(msg.getArgSourceRange(I)); - C.emitReport(R); + C.emitReport(std::move(R)); } } |