}
assert(BT);
- auto report = std::unique_ptr<BugReport>(
- new CFRefReport(*BT, C.getASTContext().getLangOpts(),
- SummaryLog, N, Sym));
+ auto report = llvm::make_unique<CFRefReport>(
+ *BT, C.getASTContext().getLangOpts(), SummaryLog, N, Sym);
report->addRange(ErrorRange);
C.emitReport(std::move(report));
}
ExplodedNode *N = C.addTransition(state, Pred, &ReturnOwnLeakTag);
if (N) {
const LangOptions &LOpts = C.getASTContext().getLangOpts();
- C.emitReport(std::unique_ptr<BugReport>(new CFRefLeakReport(
- *getLeakAtReturnBug(LOpts), LOpts,
- SummaryLog, N, Sym, C, IncludeAllocationLine)));
+ C.emitReport(llvm::make_unique<CFRefLeakReport>(
+ *getLeakAtReturnBug(LOpts), LOpts, SummaryLog, N, Sym, C,
+ IncludeAllocationLine));
}
}
}
if (!returnNotOwnedForOwned)
returnNotOwnedForOwned.reset(new ReturnedNotOwnedForOwned(this));
- C.emitReport(std::unique_ptr<BugReport>(new CFRefReport(
+ C.emitReport(llvm::make_unique<CFRefReport>(
*returnNotOwnedForOwned, C.getASTContext().getLangOpts(),
- SummaryLog, N, Sym)));
+ SummaryLog, N, Sym));
}
}
}
overAutorelease.reset(new OverAutorelease(this));
const LangOptions &LOpts = Ctx.getASTContext().getLangOpts();
- Ctx.emitReport(std::unique_ptr<BugReport>(
- new CFRefReport(*overAutorelease, LOpts,
- SummaryLog, N, Sym, os.str())));
+ Ctx.emitReport(llvm::make_unique<CFRefReport>(
+ *overAutorelease, LOpts, SummaryLog, N, Sym, os.str()));
}
return nullptr;
: getLeakAtReturnBug(LOpts);
assert(BT && "BugType not initialized.");
- Ctx.emitReport(std::unique_ptr<BugReport>(
- new CFRefLeakReport(*BT, LOpts, SummaryLog, N, *I, Ctx,
- IncludeAllocationLine)));
+ Ctx.emitReport(llvm::make_unique<CFRefLeakReport>(
+ *BT, LOpts, SummaryLog, N, *I, Ctx, IncludeAllocationLine));
}
}