[clang-tools-extra] [clangd] Use std::make_unique (NFC) (PR #97915)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 6 15:08:04 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/97915
None
>From 91325539452e0fabef33894d66a0f643319891f2 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 29 Jun 2024 12:40:11 -0700
Subject: [PATCH] [clangd] Use std::make_unique (NFC)
---
clang-tools-extra/clangd/support/ThreadsafeFS.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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