diff options
Diffstat (limited to 'clang/tools/libclang')
-rw-r--r-- | clang/tools/libclang/CIndexer.h | 4 | ||||
-rw-r--r-- | clang/tools/libclang/Indexing.cpp | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/clang/tools/libclang/CIndexer.h b/clang/tools/libclang/CIndexer.h index 94c27a05600..47e30c30ba1 100644 --- a/clang/tools/libclang/CIndexer.h +++ b/clang/tools/libclang/CIndexer.h @@ -20,6 +20,7 @@ #include "clang/Lex/ModuleLoader.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Path.h" +#include <utility> #include <vector> namespace llvm { @@ -46,7 +47,8 @@ public: CIndexer(std::shared_ptr<PCHContainerOperations> PCHContainerOps = std::make_shared<PCHContainerOperations>()) : OnlyLocalDecls(false), DisplayDiagnostics(false), - Options(CXGlobalOpt_None), PCHContainerOps(PCHContainerOps) {} + Options(CXGlobalOpt_None), PCHContainerOps(std::move(PCHContainerOps)) { + } /// \brief Whether we only want to see "local" declarations (that did not /// come from a previous precompiled header). If false, we want to see all diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index 64f4b147d97..fe14cb2664a 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/tools/libclang/Indexing.cpp @@ -7,11 +7,11 @@ // //===----------------------------------------------------------------------===// -#include "CXIndexDataConsumer.h" #include "CIndexDiagnostic.h" #include "CIndexer.h" #include "CLog.h" #include "CXCursor.h" +#include "CXIndexDataConsumer.h" #include "CXSourceLocation.h" #include "CXString.h" #include "CXTranslationUnit.h" @@ -32,6 +32,7 @@ #include "llvm/Support/Mutex.h" #include "llvm/Support/MutexGuard.h" #include <cstdio> +#include <utility> using namespace clang; using namespace clang::index; @@ -356,7 +357,7 @@ class IndexingFrontendAction : public ASTFrontendAction { public: IndexingFrontendAction(std::shared_ptr<CXIndexDataConsumer> dataConsumer, SessionSkipBodyData *skData) - : DataConsumer(dataConsumer), SKData(skData) { } + : DataConsumer(std::move(dataConsumer)), SKData(skData) {} std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override { |