Go to the documentation of this file.
9 #include "../ClangTidy.h"
10 #include "../ClangTidyModule.h"
11 #include "../ClangTidyModuleRegistry.h"
52 namespace readability {
58 "readability-avoid-const-params-in-decls");
60 "readability-braces-around-statements");
62 "readability-const-return-type");
64 "readability-container-size-empty");
66 "readability-convert-member-functions-to-static");
68 "readability-delete-null-pointer");
70 "readability-deleted-default");
72 "readability-else-after-return");
74 "readability-function-size");
76 "readability-identifier-naming");
78 "readability-implicit-bool-conversion");
80 "readability-inconsistent-declaration-parameter-name");
82 "readability-isolate-declaration");
84 "readability-magic-numbers");
86 "readability-make-member-function-const");
88 "readability-misleading-indentation");
90 "readability-misplaced-array-index");
92 "readability-qualified-auto");
94 "readability-redundant-access-specifiers");
96 "readability-redundant-function-ptr-dereference");
98 "readability-redundant-member-init");
100 "readability-redundant-preprocessor");
102 "readability-simplify-subscript-expr");
104 "readability-static-accessed-through-instance");
106 "readability-static-definition-in-anonymous-namespace");
108 "readability-string-compare");
110 "readability-named-parameter");
112 "readability-non-const-parameter");
114 "readability-redundant-control-flow");
116 "readability-redundant-declaration");
118 "readability-redundant-smartptr-get");
120 "readability-redundant-string-cstr");
122 "readability-redundant-string-init");
124 "readability-simplify-boolean-expr");
126 "readability-uniqueptr-delete-release");
128 "readability-uppercase-literal-suffix");
130 "readability-use-anyofallof");
135 static ClangTidyModuleRegistry::Add<ReadabilityModule>
136 X(
"readability-module",
"Adds readability-related checks.");
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
Checks when a constructor or an assignment operator is marked as '= default' but is actually deleted ...
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.
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 functions with unnamed arguments.
static ClangTidyModuleRegistry::Add< ReadabilityModule > X("readability-module", "Adds readability-related checks.")
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
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.
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.