Skip to content

Commit 90a5f71

Browse files
authored
Update GenFiles.cpp
1 parent 4b4e396 commit 90a5f71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/DPCT/FileGenerator/GenFiles.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ static bool formatFile(const clang::tooling::UnifiedPath &FileName,
111111
// the first input (the original output of dpct without format), then the
112112
// result is wrong.
113113
clang::LangOptions DefaultLangOptions;
114-
auto *DO = std::make_shared<DiagnosticOptions>();
115-
clang::TextDiagnosticPrinter DiagnosticPrinter(llvm::errs(), *DO);
114+
auto DiagOptions = std::make_shared<DiagnosticOptions>();
115+
clang::TextDiagnosticPrinter DiagnosticPrinter(llvm::errs(), *DiagOptions);
116116
clang::DiagnosticsEngine Diagnostics(
117117
IntrusiveRefCntPtr<clang::DiagnosticIDs>(new clang::DiagnosticIDs()),
118-
*DO, &DiagnosticPrinter, false);
118+
*DiagOptions, &DiagnosticPrinter, false);
119119

120120
clang::FileSystemOptions FSO;
121121
FSO.WorkingDir = ".";

0 commit comments

Comments
 (0)