diff options
Diffstat (limited to 'clang/unittests/Tooling/Syntax/TreeTestBase.h')
-rw-r--r-- | clang/unittests/Tooling/Syntax/TreeTestBase.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/unittests/Tooling/Syntax/TreeTestBase.h b/clang/unittests/Tooling/Syntax/TreeTestBase.h index 6110cff..fce89e2 100644 --- a/clang/unittests/Tooling/Syntax/TreeTestBase.h +++ b/clang/unittests/Tooling/Syntax/TreeTestBase.h @@ -42,9 +42,10 @@ protected: // Data fields. DiagnosticOptions DiagOpts; IntrusiveRefCntPtr<DiagnosticsEngine> Diags = - new DiagnosticsEngine(new DiagnosticIDs, DiagOpts); + llvm::makeIntrusiveRefCnt<DiagnosticsEngine>(DiagnosticIDs::create(), + DiagOpts); IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> FS = - new llvm::vfs::InMemoryFileSystem; + llvm::makeIntrusiveRefCnt<llvm::vfs::InMemoryFileSystem>(); IntrusiveRefCntPtr<FileManager> FileMgr = new FileManager(FileSystemOptions(), FS); IntrusiveRefCntPtr<SourceManager> SourceMgr = |