10 #include "../ClangTidy.h" 11 #include "../ClangTidyModule.h" 12 #include "../ClangTidyModuleRegistry.h" 13 #include "../cppcoreguidelines/NarrowingConversionsCheck.h" 62 "bugprone-argument-comment");
64 "bugprone-assert-side-effect");
66 "bugprone-bool-pointer-implicit-conversion");
68 "bugprone-copy-constructor-init");
70 "bugprone-dangling-handle");
72 "bugprone-exception-escape");
74 "bugprone-fold-init-type");
76 "bugprone-forward-declaration-namespace");
78 "bugprone-forwarding-reference-overload");
80 "bugprone-inaccurate-erase");
82 "bugprone-incorrect-roundings");
84 "bugprone-integer-division");
86 "bugprone-lambda-function-name");
88 "bugprone-macro-parentheses");
90 "bugprone-macro-repeated-side-effects");
92 "bugprone-misplaced-operator-in-strlen-in-alloc");
94 "bugprone-misplaced-widening-cast");
96 "bugprone-move-forwarding-reference");
98 "bugprone-multiple-statement-macro");
100 "bugprone-narrowing-conversions");
102 "bugprone-parent-virtual-call");
104 "bugprone-sizeof-container");
106 "bugprone-sizeof-expression");
108 "bugprone-string-constructor");
110 "bugprone-string-integer-assignment");
112 "bugprone-string-literal-with-embedded-nul");
114 "bugprone-suspicious-enum-usage");
116 "bugprone-suspicious-memset-usage");
118 "bugprone-suspicious-missing-comma");
120 "bugprone-suspicious-semicolon");
122 "bugprone-suspicious-string-compare");
124 "bugprone-swapped-arguments");
126 "bugprone-terminating-continue");
128 "bugprone-throw-keyword-missing");
130 "bugprone-undefined-memory-manipulation");
132 "bugprone-undelegated-constructor");
134 "bugprone-unused-raii");
136 "bugprone-unused-return-value");
138 "bugprone-use-after-move");
140 "bugprone-virtual-near-miss");
147 static ClangTidyModuleRegistry::Add<bugprone::BugproneModule>
148 X(
"bugprone-module",
"Adds checks for bugprone code constructs.");
Checks if an unused forward declaration is in a wrong namespace.
Finds potentially swapped arguments by looking at implicit conversions.
Finds assert() with side effect.
Finds memset calls with potential mistakes in their arguments.
Finds copy constructors where the ctor don't call the copy constructor of the base class...
Detect when func or FUNCTION is being used from within a lambda.
Finds instances where an integer is assigned to a string.
The checker detects various cases when an enum is probably misused (as a bitmask).
Find suspicious calls to string compare functions.
void registerCheck(StringRef CheckName)
Registers the CheckType with the name Name.
Checks for conditions based on implicit conversion from a bool pointer to bool.
Find usages of sizeof on expressions of STL container types.
The check warns if an object is used after it has been moved, without an intervening reinitialization...
Finds cases where 1 is added to the string in the argument to a function in the strlen() family inste...
Checks for repeated argument with side effects in macros.
Detect multiple statement macros that are used in unbraced conditionals.
The checker looks for constructors that can act as copy or move constructors through their forwarding...
A collection of ClangTidyCheckFactory instances.
Find and flag invalid initializer values in folds, e.g.
Find casts of calculation results to bigger type.
Find suspicious string literals with embedded NUL characters.
Checks for near miss of virtual methods.
The check warns if std::move is applied to a forwarding reference (i.e.
Detect dangling references in value handlers like std::experimental::string_view. ...
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
Finds cases where integer division in a floating point context is likely to cause unintended loss of ...
Finds suspicious string constructor and check their parameters.
Checks the usage of patterns known to produce incorrect rounding.
Find suspicious usages of sizeof expression.
Finds calls to grand..-parent virtual methods instead of parent's.
static ClangTidyModuleRegistry::Add< bugprone::BugproneModule > X("bugprone-module", "Adds checks for bugprone code constructs.")
Finds macros that can have unexpected behaviour due to missing parentheses.
Finds creation of temporary objects in constructors that look like a function call to another constru...
Checks for inaccurate use of the erase() method.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module...
volatile int BugproneModuleAnchorSource
Finds functions which should not throw exceptions: Destructors, move constructors, move assignment operators, the main() function, swap() functions, functions marked with throw() or noexcept and functions given as option to the checker.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Checks for narrowing conversions, e.g: int i = 0; i += 0.1;.
Emits a warning about temporary objects whose type is (or is derived from) a class that has 'EXCEPTIO...
Checks if a 'continue' statement terminates the loop (i.e.
This check finds semicolon that modifies the meaning of the program unintendedly. ...
This check finds string literals which are probably concatenated accidentally.
Finds temporaries that look like RAII objects.
Detects function calls where the return value is unused.
Finds calls of memory manipulation functions memset(), memcpy() and memmove() on not TriviallyCopyabl...