|
18 | 18 | #include "clang/Basic/SourceManager.h"
|
19 | 19 | #include "clang/Basic/Version.h"
|
20 | 20 | #include "clang/Format/Format.h"
|
21 |
| -#include "clang/Frontend/TextDiagnosticPrinter.h" |
22 | 21 | #include "clang/Rewrite/Core/Rewriter.h"
|
23 | 22 | #include "llvm/Support/CommandLine.h"
|
24 | 23 | #include "llvm/Support/FileSystem.h"
|
@@ -424,11 +423,9 @@ static bool format(StringRef FileName) {
|
424 | 423 | IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> InMemoryFileSystem(
|
425 | 424 | new llvm::vfs::InMemoryFileSystem);
|
426 | 425 | FileManager Files(FileSystemOptions(), InMemoryFileSystem);
|
427 |
| - IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts(new DiagnosticOptions()); |
428 |
| - TextDiagnosticPrinter DiagnosticsConsumer(errs(), &*DiagOpts); |
429 | 426 | DiagnosticsEngine Diagnostics(
|
430 |
| - IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs), &*DiagOpts, |
431 |
| - &DiagnosticsConsumer, false); |
| 427 | + IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs), |
| 428 | + new DiagnosticOptions); |
432 | 429 | SourceManager Sources(Diagnostics, Files);
|
433 | 430 | FileID ID = createInMemoryFile(AssumedFileName, Code.get(), Sources, Files,
|
434 | 431 | InMemoryFileSystem.get());
|
|
0 commit comments