Go to the documentation of this file.
9 #include "../ClangTidy.h"
10 #include "../ClangTidyModule.h"
11 #include "../ClangTidyModuleRegistry.h"
57 namespace readability {
63 "readability-avoid-const-params-in-decls");
65 "readability-braces-around-statements");
67 "readability-const-return-type");
69 "readability-container-contains");
71 "readability-container-data-pointer");
73 "readability-container-size-empty");
75 "readability-convert-member-functions-to-static");
77 "readability-delete-null-pointer");
79 "readability-duplicate-include");
81 "readability-else-after-return");
83 "readability-function-cognitive-complexity");
85 "readability-function-size");
87 "readability-identifier-length");
89 "readability-identifier-naming");
91 "readability-implicit-bool-conversion");
93 "readability-inconsistent-declaration-parameter-name");
95 "readability-isolate-declaration");
97 "readability-magic-numbers");
99 "readability-make-member-function-const");
101 "readability-misleading-indentation");
103 "readability-misplaced-array-index");
105 "readability-qualified-auto");
107 "readability-redundant-access-specifiers");
109 "readability-redundant-function-ptr-dereference");
111 "readability-redundant-member-init");
113 "readability-redundant-preprocessor");
115 "readability-simplify-subscript-expr");
117 "readability-static-accessed-through-instance");
119 "readability-static-definition-in-anonymous-namespace");
121 "readability-string-compare");
123 "readability-named-parameter");
125 "readability-non-const-parameter");
127 "readability-redundant-control-flow");
129 "readability-redundant-declaration");
131 "readability-redundant-smartptr-get");
133 "readability-redundant-string-cstr");
135 "readability-redundant-string-init");
137 "readability-simplify-boolean-expr");
139 "readability-suspicious-call-argument");
141 "readability-uniqueptr-delete-release");
143 "readability-uppercase-literal-suffix");
145 "readability-use-anyofallof");
150 static ClangTidyModuleRegistry::Add<ReadabilityModule>
151 X(
"readability-module",
"Adds readability-related checks.");
Finds function calls where the arguments passed are provided out of order, based on the difference be...
Finds unnecessary calls to std::string::c_str().
Checks the code for dangling else, and possible misleading indentations due to missing braces.
volatile int ReadabilityModuleAnchorSource
Find redundant variable declarations.
Checks that bodies of if statements and loops (for, range-for, do-while, and while) are inside braces...
Find and remove redundant calls to smart pointer's .get() method.
Eliminate redundant dereferences of a function pointer.
Finds non-static member functions that can be made 'const'.
Finds member initializations that are unnecessary because the same default constructor would be calle...
Eliminates redundant return statements at the end of a function that returns void.
Finds unnecessary string initializations.
A collection of ClangTidyCheckFactory instances.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module.
Detects when the integral literal or floating point literal has non-uppercase suffix,...
Checks for declarations of functions which differ in parameter names.
Checks whether a call to the size() method can be replaced with a call to empty().
Warn when a pointer function parameter can be const.
Warns about identifiers names whose length is too short.
Finds usages of container.count() and find() == end() which should be replaced by a call to the conta...
Looks for boolean expressions involving boolean constants and simplifies them to use the appropriate ...
Checks for large functions based on various metrics.
This check flags all calls compare when used to check for string equality or inequality.
Detects magic numbers, integer and floating point literals embedded in code.
This check finds C++ class methods than can be made static because they don't use the 'this' pointer.
Checks for member expressions that access static members through instances and replaces them with use...
Finds ranged-based for loops that can be replaced by a call to std::any_of or std::all_of.
Flags the usages of else after return.
Warn about unusual array index syntax (index[array] instead of array[index]).
Simplifies subscript expressions.
This check diagnoses all DeclStmt's declaring more than one variable and tries to refactor the code t...
Checks for identifiers naming style mismatch.
Find and remove duplicate #include directives.
Find functions with unnamed arguments.
static ClangTidyModuleRegistry::Add< ReadabilityModule > X("readability-module", "Adds readability-related checks.")
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Checks function Cognitive Complexity metric.
Finds variables declared as auto that could be declared as: 'auto*' or 'const auto *' and reference v...
Flags statements of the form delete <unique_ptr expr>.release(); and replaces them with: <unique_ptr ...
This check flags redundant preprocessor directives: nested directives with the same condition.
Detects redundant access specifiers inside classes, structs, and unions.
Checks whether a call to operator[] and & can be replaced with a call to data().
Check whether the 'if' statement is unnecessary before calling 'delete' on a pointer.
Checks for use of implicit bool conversions in expressions.
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
For any function whose return type is const-qualified, suggests removal of the const qualifier from t...
void registerCheck(llvm::StringRef CheckName)
Registers the CheckType with the name Name.
Finds static function and variable definitions in anonymous namespace.