[clang] af7a421 - [clang][deps] NFC: Remove explicit call to implicit constructor

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 17 05:00:30 PST 2021


Author: Jan Svoboda
Date: 2021-12-17T14:00:20+01:00
New Revision: af7a421ef4aaf3d098ba78c1dda8ac35d31136cd

URL: https://github.com/llvm/llvm-project/commit/af7a421ef4aaf3d098ba78c1dda8ac35d31136cd
DIFF: https://github.com/llvm/llvm-project/commit/af7a421ef4aaf3d098ba78c1dda8ac35d31136cd.diff

LOG: [clang][deps] NFC: Remove explicit call to implicit constructor

Added: 
    

Modified: 
    clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
index 664c118473b9..199ab2bfe882 100644
--- a/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
+++ b/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
@@ -241,8 +241,8 @@ class MinimizedVFSFile final : public llvm::vfs::File {
 llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>> MinimizedVFSFile::create(
     EntryRef Entry, ExcludedPreprocessorDirectiveSkipMapping *PPSkipMappings) {
   if (Entry.isDirectory())
-    return llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>(
-        std::make_error_code(std::errc::is_a_directory));
+    return std::make_error_code(std::errc::is_a_directory);
+
   llvm::ErrorOr<StringRef> Contents = Entry.getContents();
   if (!Contents)
     return Contents.getError();


        


More information about the cfe-commits mailing list