9#include "../ClangTidy.h"
10#include "../ClangTidyModule.h"
11#include "../ClangTidyModuleRegistry.h"
65 "modernize-concat-nested-namespaces");
67 "modernize-deprecated-headers");
69 "modernize-deprecated-ios-base-aliases");
75 "modernize-min-max-use-initializer-list");
78 "modernize-use-designated-initializers");
81 "modernize-use-starts-ends-with");
84 "modernize-use-std-numbers");
87 "modernize-raw-string-literal");
89 "modernize-redundant-void-arg");
91 "modernize-replace-auto-ptr");
93 "modernize-replace-disallow-copy-and-assign-macro");
95 "modernize-replace-random-shuffle");
97 "modernize-return-braced-init-list");
101 "modernize-unary-static-assert");
104 "modernize-use-bool-literals");
106 "modernize-use-constraints");
108 "modernize-use-default-member-init");
112 "modernize-use-equals-delete");
114 "modernize-use-nodiscard");
119 "modernize-use-trailing-return-type");
121 "modernize-use-transparent-functors");
123 "modernize-use-uncaught-exceptions");
129static ClangTidyModuleRegistry::Add<ModernizeModule>
X(
"modernize-module",
130 "Add modernize checks.");
A collection of ClangTidyCheckFactory instances.
void registerCheck(llvm::StringRef CheckName)
Registers the CheckType with the name Name.
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
Replace simple uses of std::bind with a lambda.
Find C-style array types and recommend to use std::array<> / std::vector<>.
This check warns the uses of the deprecated member types of std::ios_base and replaces those that hav...
Replaces groups of related macros with an unscoped anonymous enum.
Replaces nested std::min and std::max calls with an initializer list where applicable.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module.
This check replaces string literals with escaped characters to raw string literals.
Find and remove redundant void argument lists.
Transforms the deprecated std::auto_ptr into the C++11 std::unique_ptr.
This check finds macro expansions of DISALLOW_COPY_AND_ASSIGN(Type) and replaces them with a deleted ...
std::random_shuffle will be removed as of C++17.
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.
Converts standard library type traits of the form traits<...>::type and traits<......
Replaces a static_assert declaration with an empty message with the unary version.
Finds integer literals which are cast to bool.
Replace enable_if with C++20 requires clauses.
Convert a default constructor's member initializers into default member initializers.
Finds initializer lists for aggregate type that could be written as designated initializers instead.
This check looks for cases when inserting new element into std::vector but the element is constructed...
Replace default bodies of special member functions with '= default;'.
Identifies unimplemented private special member functions, and recommends using = delete for them.
Add [[nodiscard]] to non-void const-member functions with no arguments or pass-by-value or pass by co...
Replace dynamic exception specifications, with noexcept (or user-defined macro) or noexcept(false).
Use C++11's override and remove virtual where applicable.
Detects calls to standard library iterator algorithms that could be replaced with a ranges version in...
Checks for common roundabout ways to express starts_with and ends_with and suggests replacing with st...
Finds constants and function calls to math functions that can be replaced with c++20's mathematical c...
Convert calls to printf-like functions to std::print and std::println.
Rewrites function signatures to use a trailing return type.
Prefer using transparent functors to non-transparent ones.
This check will warn on calls to std::uncaught_exception and replace them with calls to std::uncaught...
Check finds typedefs and replaces it with usings.
volatile int ModernizeModuleAnchorSource