10 #include "../ClangTidy.h"
11 #include "../ClangTidyModule.h"
12 #include "../ClangTidyModuleRegistry.h"
31 using namespace clang::ast_matchers;
41 "modernize-avoid-bind");
43 "modernize-deprecated-headers");
49 "modernize-raw-string-literal");
51 "modernize-redundant-void-arg");
53 "modernize-replace-auto-ptr");
57 "modernize-use-bool-literals");
70 Opts[
"modernize-loop-convert.MaxCopySize"] =
"16";
72 Opts[
"modernize-loop-convert.MinConfidence"] =
"reasonable";
73 Opts[
"modernize-loop-convert.NamingStyle"] =
"CamelCase";
74 Opts[
"modernize-pass-by-value.IncludeStyle"] =
"llvm";
75 Opts[
"modernize-replace-auto-ptr.IncludeStyle"] =
"llvm";
78 Opts[
"modernize-use-nullptr.NullMacros"] =
"NULL";
84 static ClangTidyModuleRegistry::Add<ModernizeModule>
X(
"modernize-module",
85 "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.
Contains options for clang-tidy.
A collection of ClangTidyCheckFactory instances.
OptionMap CheckOptions
Key-value mapping used to store check-specific options.
Replace default bodies of special member functions with '= default;'.
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.
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
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...