aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/Syntax/TreeTestBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Tooling/Syntax/TreeTestBase.h')
-rw-r--r--clang/unittests/Tooling/Syntax/TreeTestBase.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/unittests/Tooling/Syntax/TreeTestBase.h b/clang/unittests/Tooling/Syntax/TreeTestBase.h
index 6110cff..e85d76c 100644
--- a/clang/unittests/Tooling/Syntax/TreeTestBase.h
+++ b/clang/unittests/Tooling/Syntax/TreeTestBase.h
@@ -42,13 +42,14 @@ 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);
+ llvm::makeIntrusiveRefCnt<FileManager>(FileSystemOptions(), FS);
IntrusiveRefCntPtr<SourceManager> SourceMgr =
- new SourceManager(*Diags, *FileMgr);
+ llvm::makeIntrusiveRefCnt<SourceManager>(*Diags, *FileMgr);
std::shared_ptr<CompilerInvocation> Invocation;
// Set after calling buildTree().
std::unique_ptr<syntax::TokenBuffer> TB;