File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
clang/lib/DPCT/FileGenerator Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ static bool formatFile(const clang::tooling::UnifiedPath &FileName,
111
111
// the first input (the original output of dpct without format), then the
112
112
// result is wrong.
113
113
clang::LangOptions DefaultLangOptions;
114
- auto *DO = new DiagnosticOptions;
114
+ auto *DO = std::make_shared< DiagnosticOptions>() ;
115
115
clang::TextDiagnosticPrinter DiagnosticPrinter (llvm::errs (), *DO);
116
116
clang::DiagnosticsEngine Diagnostics (
117
117
IntrusiveRefCntPtr<clang::DiagnosticIDs>(new clang::DiagnosticIDs ()),
@@ -909,7 +909,7 @@ int saveNewFiles(clang::tooling::RefactoringTool &Tool,
909
909
volatile ProcessStatus status = MigrationSucceeded;
910
910
// Set up Rewriter.
911
911
LangOptions DefaultLangOptions;
912
- auto DiagOpts = std::make_shared<DiagnosticOptions>();
912
+ auto DiagOpts = std::make_shared<DiagnosticOptions>();
913
913
TextDiagnosticPrinter DiagnosticPrinter (llvm::errs (), *DiagOpts);
914
914
DiagnosticsEngine Diagnostics (
915
915
IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs ()), *DiagOpts,
You can’t perform that action at this time.
0 commit comments