diff options
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index 09e5c65..4028bbf 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -2391,11 +2391,11 @@ SourceManagerForFile::SourceManagerForFile(StringRef FileName, // in `Environment` so that `FileMgr` can out-live this function scope. FileMgr = std::make_unique<FileManager>(FileSystemOptions(), InMemoryFileSystem); - DiagOpts = std::make_unique<DiagnosticOptions>(); // This is passed to `SM` as reference, so the pointer has to be referenced // by `Environment` due to the same reason above. Diagnostics = std::make_unique<DiagnosticsEngine>( - IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs), *DiagOpts); + IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs), + new DiagnosticOptions); SourceMgr = std::make_unique<SourceManager>(*Diagnostics, *FileMgr); FileEntryRef FE = llvm::cantFail(FileMgr->getFileRef(FileName)); FileID ID = |