aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-05-27 14:27:13 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-05-27 14:27:13 +0000
commitcfeacf56f03e5ce8bfb32537d64935b2f58e19ee (patch)
treeb696d27cbd95b40df1221c603b81cb300fc69aae /clang/lib/Basic/VirtualFileSystem.cpp
parent4ccda502d5c63e13e5f6777cfc1570b5d585b841 (diff)
downloadllvm-cfeacf56f03e5ce8bfb32537d64935b2f58e19ee.zip
llvm-cfeacf56f03e5ce8bfb32537d64935b2f58e19ee.tar.gz
llvm-cfeacf56f03e5ce8bfb32537d64935b2f58e19ee.tar.bz2
Apply clang-tidy's misc-move-constructor-init throughout Clang.
No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270996
Diffstat (limited to 'clang/lib/Basic/VirtualFileSystem.cpp')
-rw-r--r--clang/lib/Basic/VirtualFileSystem.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp
index 34d1b05..d64c4e3 100644
--- a/clang/lib/Basic/VirtualFileSystem.cpp
+++ b/clang/lib/Basic/VirtualFileSystem.cpp
@@ -16,15 +16,16 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/iterator_range.h"
+#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/YAMLParser.h"
-#include "llvm/Config/llvm-config.h"
#include <atomic>
#include <memory>
+#include <utility>
// For chdir.
#ifdef LLVM_ON_WIN32
@@ -867,7 +868,7 @@ class RedirectingFileSystem : public vfs::FileSystem {
private:
RedirectingFileSystem(IntrusiveRefCntPtr<FileSystem> ExternalFS)
- : ExternalFS(ExternalFS) {}
+ : ExternalFS(std::move(ExternalFS)) {}
/// \brief Looks up \p Path in \c Roots.
ErrorOr<Entry *> lookupPath(const Twine &Path);
@@ -1530,7 +1531,7 @@ class FileWithFixedStatus : public File {
public:
FileWithFixedStatus(std::unique_ptr<File> InnerFile, Status S)
- : InnerFile(std::move(InnerFile)), S(S) {}
+ : InnerFile(std::move(InnerFile)), S(std::move(S)) {}
ErrorOr<Status> status() override { return S; }
ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>