10 #include "../ClangTidy.h"
11 #include "../ClangTidyModule.h"
12 #include "../ClangTidyModuleRegistry.h"
34 using namespace clang::ast_matchers;
45 "modernize-deprecated-headers");
51 "modernize-raw-string-literal");
53 "modernize-redundant-void-arg");
55 "modernize-replace-auto-ptr");
59 "modernize-use-bool-literals");
61 "modernize-use-default-member-init");
65 "modernize-use-equals-delete");
69 "modernize-use-transparent-functors");
78 Opts[
"modernize-loop-convert.MaxCopySize"] =
"16";
80 Opts[
"modernize-loop-convert.MinConfidence"] =
"reasonable";
81 Opts[
"modernize-loop-convert.NamingStyle"] =
"CamelCase";
82 Opts[
"modernize-pass-by-value.IncludeStyle"] =
"llvm";
83 Opts[
"modernize-replace-auto-ptr.IncludeStyle"] =
"llvm";
86 Opts[
"modernize-use-nullptr.NullMacros"] =
"NULL";
92 static ClangTidyModuleRegistry::Add<ModernizeModule>
X(
"modernize-module",
93 "Add modernize checks.");
This check replaces string literals with escaped characters to raw string literals.
Transforms the deprecated std::auto_ptr into the C++11 std::unique_ptr.
Finds integer literals which are cast to bool.
static clang::FrontendPluginRegistry::Add< clang::tidy::ClangTidyPluginAction > X("clang-tidy","clang-tidy")
Use C++11's override and remove virtual where applicable.
void registerCheck(StringRef CheckName)
Registers the CheckType with the name Name.
Convert a default constructor's member initializers into default member initializers.
Contains options for clang-tidy.
Replace default bodies of special member functions with '= default;'.
A collection of ClangTidyCheckFactory instances.
OptionMap CheckOptions
Key-value mapping used to store check-specific options.
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
Find and remove redundant void argument lists.
Replace simple uses of std::bind with a lambda.
ClangTidyOptions getModuleOptions() override
Gets default options for checks defined in this module.
Prefer using transparent functors to non-transparent ones.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module...
Check finds typedefs and replaces it with usings.
volatile int ModernizeModuleAnchorSource
Mark unimplemented private special member functions with '= delete'.
Replace copy and swap tricks on shrinkable containers with the shrink_to_fit() method call...
This check looks for cases when inserting new element into std::vector but the element is constructed...