[clang-tools-extra] f767295 - [clangd] Use std::make_unique (NFC) (#97915)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 6 16:15:11 PDT 2024


Author: Kazu Hirata
Date: 2024-07-07T08:15:09+09:00
New Revision: f767295942288bd70156ad322defac60b568c927

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

LOG: [clangd] Use std::make_unique (NFC) (#97915)

Added: 
    

Modified: 
    clang-tools-extra/clangd/support/ThreadsafeFS.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/support/ThreadsafeFS.cpp b/clang-tools-extra/clangd/support/ThreadsafeFS.cpp
index 0e249d07d2fd9..7398e4258527b 100644
--- a/clang-tools-extra/clangd/support/ThreadsafeFS.cpp
+++ b/clang-tools-extra/clangd/support/ThreadsafeFS.cpp
@@ -41,7 +41,7 @@ class VolatileFileSystem : public llvm::vfs::ProxyFileSystem {
     llvm::StringRef FileName = llvm::sys::path::filename(Path);
     if (FileName.starts_with("preamble-") && FileName.ends_with(".pch"))
       return File;
-    return std::unique_ptr<VolatileFile>(new VolatileFile(std::move(*File)));
+    return std::make_unique<VolatileFile>(std::move(*File));
   }
 
 private:


        


More information about the cfe-commits mailing list