diff options
Diffstat (limited to 'clang/unittests/Tooling/Syntax')
-rw-r--r-- | clang/unittests/Tooling/Syntax/TokensTest.cpp | 8 | ||||
-rw-r--r-- | clang/unittests/Tooling/Syntax/TreeTestBase.cpp | 4 | ||||
-rw-r--r-- | clang/unittests/Tooling/Syntax/TreeTestBase.h | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/clang/unittests/Tooling/Syntax/TokensTest.cpp b/clang/unittests/Tooling/Syntax/TokensTest.cpp index e86793f..6094177 100644 --- a/clang/unittests/Tooling/Syntax/TokensTest.cpp +++ b/clang/unittests/Tooling/Syntax/TokensTest.cpp @@ -134,8 +134,8 @@ public: FileName, llvm::MemoryBuffer::getMemBufferCopy(Code).release()); CompilerInstance Compiler(std::move(CI)); Compiler.setDiagnostics(Diags); - Compiler.setFileManager(FileMgr.get()); - Compiler.setSourceManager(SourceMgr.get()); + Compiler.setFileManager(FileMgr); + Compiler.setSourceManager(SourceMgr); this->Buffer = TokenBuffer(*SourceMgr); RecordTokens Recorder(this->Buffer); @@ -255,9 +255,9 @@ public: IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> FS = llvm::makeIntrusiveRefCnt<llvm::vfs::InMemoryFileSystem>(); llvm::IntrusiveRefCntPtr<FileManager> FileMgr = - new FileManager(FileSystemOptions(), FS); + llvm::makeIntrusiveRefCnt<FileManager>(FileSystemOptions(), FS); llvm::IntrusiveRefCntPtr<SourceManager> SourceMgr = - new SourceManager(*Diags, *FileMgr); + llvm::makeIntrusiveRefCnt<SourceManager>(*Diags, *FileMgr); /// Contains last result of calling recordTokens(). TokenBuffer Buffer = TokenBuffer(*SourceMgr); }; diff --git a/clang/unittests/Tooling/Syntax/TreeTestBase.cpp b/clang/unittests/Tooling/Syntax/TreeTestBase.cpp index 4a25863..400a0d5 100644 --- a/clang/unittests/Tooling/Syntax/TreeTestBase.cpp +++ b/clang/unittests/Tooling/Syntax/TreeTestBase.cpp @@ -153,8 +153,8 @@ SyntaxTreeTest::buildTree(StringRef Code, const TestClangConfig &ClangConfig) { FileName, llvm::MemoryBuffer::getMemBufferCopy(Code).release()); CompilerInstance Compiler(Invocation); Compiler.setDiagnostics(Diags); - Compiler.setFileManager(FileMgr.get()); - Compiler.setSourceManager(SourceMgr.get()); + Compiler.setFileManager(FileMgr); + Compiler.setSourceManager(SourceMgr); syntax::TranslationUnit *Root = nullptr; BuildSyntaxTreeAction Recorder(Root, this->TM, this->TB, this->Arena); diff --git a/clang/unittests/Tooling/Syntax/TreeTestBase.h b/clang/unittests/Tooling/Syntax/TreeTestBase.h index fce89e2..e85d76c 100644 --- a/clang/unittests/Tooling/Syntax/TreeTestBase.h +++ b/clang/unittests/Tooling/Syntax/TreeTestBase.h @@ -47,9 +47,9 @@ protected: IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> FS = 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; |