diff --git a/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.h b/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.h --- a/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.h +++ b/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.h @@ -10,9 +10,6 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_MOVECONSTRUCTORINITCHECK_H #include "../ClangTidyCheck.h" -#include "../utils/IncludeInserter.h" - -#include namespace clang { namespace tidy { @@ -31,12 +28,6 @@ } void registerMatchers(ast_matchers::MatchFinder *Finder) override; void check(const ast_matchers::MatchFinder::MatchResult &Result) override; - void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, - Preprocessor *ModuleExpanderPP) override; - void storeOptions(ClangTidyOptions::OptionMap &Opts) override; - -private: - utils::IncludeInserter Inserter; }; } // namespace performance diff --git a/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp b/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp --- a/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp +++ b/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp @@ -10,9 +10,6 @@ #include "../utils/Matchers.h" #include "clang/AST/ASTContext.h" #include "clang/ASTMatchers/ASTMatchFinder.h" -#include "clang/Frontend/CompilerInstance.h" -#include "clang/Lex/Lexer.h" -#include "clang/Lex/Preprocessor.h" using namespace clang::ast_matchers; @@ -22,9 +19,7 @@ MoveConstructorInitCheck::MoveConstructorInitCheck(StringRef Name, ClangTidyContext *Context) - : ClangTidyCheck(Name, Context), - Inserter(Options.getLocalOrGlobal("IncludeStyle", - utils::IncludeSorter::IS_LLVM)) {} + : ClangTidyCheck(Name, Context) {} void MoveConstructorInitCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( @@ -68,7 +63,7 @@ // initializer. // // FIXME: Determine whether the move constructor is a viable candidate - // for the ctor-initializer, perhaps provide a fixit that suggests + // for the ctor-initializer, perhaps provide a fix-it that suggests // using std::move(). Candidate = Ctor; break; @@ -88,15 +83,6 @@ } } -void MoveConstructorInitCheck::registerPPCallbacks( - const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - Inserter.registerPreprocessor(PP); -} - -void MoveConstructorInitCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { - Options.store(Opts, "IncludeStyle", Inserter.getStyle()); -} - } // namespace performance } // namespace tidy } // namespace clang diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -264,7 +264,7 @@ `performance-inefficient-string-concatenation `_, `performance-inefficient-vector-operation `_, "Yes" `performance-move-const-arg `_, "Yes" - `performance-move-constructor-init `_, "Yes" + `performance-move-constructor-init `_, `performance-no-automatic-move `_, `performance-no-int-to-ptr `_, `performance-noexcept-move-constructor `_, "Yes" @@ -331,7 +331,7 @@ `cert-fio38-c `_, `misc-non-copyable-objects `_, `cert-msc30-c `_, `cert-msc50-cpp `_, `cert-msc32-c `_, `cert-msc51-cpp `_, - `cert-oop11-cpp `_, `performance-move-constructor-init `_, "Yes" + `cert-oop11-cpp `_, `performance-move-constructor-init `_, `cert-oop54-cpp `_, `bugprone-unhandled-self-assignment `_, `cert-pos44-c `_, `bugprone-bad-signal-to-kill-thread `_, `cert-pos47-c `_, `concurrency-thread-canceltype-asynchronous `_, diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance-move-constructor-init.rst b/clang-tools-extra/docs/clang-tidy/checks/performance-move-constructor-init.rst --- a/clang-tools-extra/docs/clang-tidy/checks/performance-move-constructor-init.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance-move-constructor-init.rst @@ -8,11 +8,3 @@ The check flags user-defined move constructors that have a ctor-initializer initializing a member or base class through a copy constructor instead of a move constructor. - -Options -------- - -.. option:: IncludeStyle - - A string specifying which include-style is used, `llvm` or `google`. Default - is `llvm`.