]> granicus.if.org Git - clang/commitdiff
[clang-scan-deps] cast Result to ErrorOr<unique_ptr<vfs::File>> explicitly to avoid...
authorAlex Lorenz <arphaman@gmail.com>
Wed, 11 Sep 2019 21:00:13 +0000 (21:00 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Wed, 11 Sep 2019 21:00:13 +0000 (21:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371664 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp

index 12e8df6360c15a1a809c370c587bc1a1f47b7c78..7a3d189adac282fe6864c5c7d9f06773f9a70fae 100644 (file)
@@ -203,7 +203,8 @@ createFile(const CachedFileSystemEntry *Entry,
   if (!Entry->getPPSkippedRangeMapping().empty() && PPSkipMappings)
     (*PPSkipMappings)[Result->getBufferPtr()] =
         &Entry->getPPSkippedRangeMapping();
-  return Result;
+  return llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>(
+      std::unique_ptr<llvm::vfs::File>(std::move(Result)));
 }
 
 } // end anonymous namespace