Go to the documentation of this file.
9 #include "../ClangTidy.h"
10 #include "../ClangTidyModule.h"
11 #include "../ClangTidyModuleRegistry.h"
57 "modernize-concat-nested-namespaces");
59 "modernize-deprecated-headers");
61 "modernize-deprecated-ios-base-aliases");
68 "modernize-raw-string-literal");
70 "modernize-redundant-void-arg");
72 "modernize-replace-auto-ptr");
74 "modernize-replace-disallow-copy-and-assign-macro");
76 "modernize-replace-random-shuffle");
78 "modernize-return-braced-init-list");
81 "modernize-unary-static-assert");
84 "modernize-use-bool-literals");
86 "modernize-use-default-member-init");
90 "modernize-use-equals-delete");
92 "modernize-use-nodiscard");
97 "modernize-use-trailing-return-type");
99 "modernize-use-transparent-functors");
101 "modernize-use-uncaught-exceptions");
110 Opts[
"modernize-loop-convert.MaxCopySize"] =
"16";
112 Opts[
"modernize-loop-convert.MinConfidence"] =
"reasonable";
113 Opts[
"modernize-loop-convert.NamingStyle"] =
"CamelCase";
114 Opts[
"modernize-pass-by-value.IncludeStyle"] =
"llvm";
115 Opts[
"modernize-replace-auto-ptr.IncludeStyle"] =
"llvm";
118 Opts[
"modernize-use-nullptr.NullMacros"] =
"NULL";
124 static ClangTidyModuleRegistry::Add<ModernizeModule>
X(
"modernize-module",
125 "Add modernize checks.");
Finds integer literals which are cast to bool.
This check looks for cases when inserting new element into std::vector but the element is constructed...
Rewrites function signatures to use a trailing return type.
Check finds typedefs and replaces it with usings.
Convert a default constructor's member initializers into default member initializers.
This check replaces string literals with escaped characters to raw string literals.
Replace default bodies of special member functions with '= default;'.
OptionMap CheckOptions
Key-value mapping used to store check-specific options.
Contains options for clang-tidy.
A collection of ClangTidyCheckFactory instances.
Prefer using transparent functors to non-transparent ones.
Find and remove redundant void argument lists.
ClangTidyOptions getModuleOptions() override
Gets default options for checks defined in this module.
Use C++11's override and remove virtual where applicable.
Transforms the deprecated std::auto_ptr into the C++11 std::unique_ptr.
Replaces groups of related macros with an unscoped anonymous enum.
This check finds macro expansions of DISALLOW_COPY_AND_ASSIGN(Type) and replaces them with a deleted ...
Add [[nodiscard]] to non-void const-member functions with no arguments or pass-by-value or pass by co...
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Replace dynamic exception specifications, with noexcept (or user-defined macro) or noexcept(false).
Replace copy and swap tricks on shrinkable containers with the shrink_to_fit() method call.
Mark unimplemented private special member functions with '= delete'.
This check warns the uses of the deprecated member types of std::ios_base and replaces those that hav...
Use a braced init list for return statements rather than unnecessary repeating the return type name.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module.
volatile int ModernizeModuleAnchorSource
This check will warn on calls to std::uncaught_exception and replace them with calls to std::uncaught...
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
std::random_shuffle will be removed as of C++17.
Replaces a static_assert declaration with an empty message with the unary version.
void registerCheck(llvm::StringRef CheckName)
Registers the CheckType with the name Name.
Find C-style array types and recommend to use std::array<> / std::vector<>.
Replace simple uses of std::bind with a lambda.