10 #include "../ClangTidy.h" 11 #include "../ClangTidyModule.h" 12 #include "../ClangTidyModuleRegistry.h" 49 "modernize-deprecated-headers");
55 "modernize-raw-string-literal");
57 "modernize-redundant-void-arg");
59 "modernize-replace-auto-ptr");
61 "modernize-replace-random-shuffle");
63 "modernize-return-braced-init-list");
66 "modernize-unary-static-assert");
69 "modernize-use-bool-literals");
71 "modernize-use-default-member-init");
75 "modernize-use-equals-delete");
80 "modernize-use-transparent-functors");
89 Opts[
"modernize-loop-convert.MaxCopySize"] =
"16";
91 Opts[
"modernize-loop-convert.MinConfidence"] =
"reasonable";
92 Opts[
"modernize-loop-convert.NamingStyle"] =
"CamelCase";
93 Opts[
"modernize-pass-by-value.IncludeStyle"] =
"llvm";
94 Opts[
"modernize-replace-auto-ptr.IncludeStyle"] =
"llvm";
97 Opts[
"modernize-use-nullptr.NullMacros"] =
"NULL";
103 static ClangTidyModuleRegistry::Add<ModernizeModule>
X(
"modernize-module",
104 "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.
Replace dynamic exception specifications, with noexcept (or user-defined macro) or noexcept(false)...
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.
std::random_shuffle will be removed as of C++17.
static clang::FrontendPluginRegistry::Add< clang::tidy::ClangTidyPluginAction > X("clang-tidy", "clang-tidy")
Prefer using transparent functors to non-transparent ones.
Replaces a static_assert declaration with an empty message with the unary version.
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'.
Use a braced init list for return statements rather than unnecessary repeating the return type name...
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...