Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit b806c5a

Browse files
committed
Change setDiagnosticsOutputFile to take a unique_ptr from a raw pointer (NFC)
Summary: This makes it explicit that ownership is taken. Also replace all `new` with make_unique<> at call sites. Reviewers: anemet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26884 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287449 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 8a6ea81 commit b806c5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: lib/CodeGen/CodeGenAction.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ namespace clang {
195195
return;
196196
}
197197

198-
Ctx.setDiagnosticsOutputFile(new yaml::Output(OptRecordFile->os()));
198+
Ctx.setDiagnosticsOutputFile(
199+
llvm::make_unique<yaml::Output>(OptRecordFile->os()));
199200

200201
if (CodeGenOpts.getProfileUse() != CodeGenOptions::ProfileNone)
201202
Ctx.setDiagnosticHotnessRequested(true);

0 commit comments

Comments
 (0)