]> granicus.if.org Git - clang/commitdiff
Move a ref-counted pointer instead of copying it. NFC.
authorAlexander Kornienko <alexfh@google.com>
Tue, 27 Mar 2018 14:02:06 +0000 (14:02 +0000)
committerAlexander Kornienko <alexfh@google.com>
Tue, 27 Mar 2018 14:02:06 +0000 (14:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328623 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Tooling/Tooling.cpp

index caaf3aa95b802695aee655058aeca76bdbff97a1..06440660615a48a4b981946d12b1c9c66ca7ffbc 100644 (file)
@@ -361,7 +361,7 @@ ClangTool::ClangTool(const CompilationDatabase &Compilations,
                      IntrusiveRefCntPtr<vfs::FileSystem> BaseFS)
     : Compilations(Compilations), SourcePaths(SourcePaths),
       PCHContainerOps(std::move(PCHContainerOps)),
-      OverlayFileSystem(new vfs::OverlayFileSystem(BaseFS)),
+      OverlayFileSystem(new vfs::OverlayFileSystem(std::move(BaseFS))),
       InMemoryFileSystem(new vfs::InMemoryFileSystem),
       Files(new FileManager(FileSystemOptions(), OverlayFileSystem)) {
   OverlayFileSystem->pushOverlay(InMemoryFileSystem);