124class BugproneModule :
public ClangTidyModule {
126 void addCheckFactories(ClangTidyCheckFactories &CheckFactories)
override {
127 CheckFactories.registerCheck<ArgumentCommentCheck>(
128 "bugprone-argument-comment");
129 CheckFactories.registerCheck<AssertSideEffectCheck>(
130 "bugprone-assert-side-effect");
131 CheckFactories.registerCheck<AssignmentInIfConditionCheck>(
132 "bugprone-assignment-in-if-condition");
133 CheckFactories.registerCheck<AssignmentInSelectionStatementCheck>(
134 "bugprone-assignment-in-selection-statement");
135 CheckFactories.registerCheck<BadSignalToKillThreadCheck>(
136 "bugprone-bad-signal-to-kill-thread");
137 CheckFactories.registerCheck<BitwisePointerCastCheck>(
138 "bugprone-bitwise-pointer-cast");
139 CheckFactories.registerCheck<BoolPointerImplicitConversionCheck>(
140 "bugprone-bool-pointer-implicit-conversion");
141 CheckFactories.registerCheck<BranchCloneCheck>(
"bugprone-branch-clone");
142 CheckFactories.registerCheck<CapturingThisInMemberVariableCheck>(
143 "bugprone-capturing-this-in-member-variable");
144 CheckFactories.registerCheck<CastingThroughVoidCheck>(
145 "bugprone-casting-through-void");
146 CheckFactories.registerCheck<ChainedComparisonCheck>(
147 "bugprone-chained-comparison");
148 CheckFactories.registerCheck<CommandProcessorCheck>(
149 "bugprone-command-processor");
150 CheckFactories.registerCheck<ComparePointerToMemberVirtualFunctionCheck>(
151 "bugprone-compare-pointer-to-member-virtual-function");
152 CheckFactories.registerCheck<CopyConstructorInitCheck>(
153 "bugprone-copy-constructor-init");
154 CheckFactories.registerCheck<CopyConstructorMutatesArgumentCheck>(
155 "bugprone-copy-constructor-mutates-argument");
156 CheckFactories.registerCheck<DanglingHandleCheck>(
157 "bugprone-dangling-handle");
158 CheckFactories.registerCheck<DefaultOperatorNewOnOveralignedTypeCheck>(
159 "bugprone-default-operator-new-on-overaligned-type");
160 CheckFactories.registerCheck<DerivedMethodShadowingBaseMethodCheck>(
161 "bugprone-derived-method-shadowing-base-method");
162 CheckFactories.registerCheck<DynamicStaticInitializersCheck>(
163 "bugprone-dynamic-static-initializers");
164 CheckFactories.registerCheck<EasilySwappableParametersCheck>(
165 "bugprone-easily-swappable-parameters");
166 CheckFactories.registerCheck<EmptyCatchCheck>(
"bugprone-empty-catch");
167 CheckFactories.registerCheck<ExceptionCopyConstructorThrowsCheck>(
168 "bugprone-exception-copy-constructor-throws");
169 CheckFactories.registerCheck<ExceptionEscapeCheck>(
170 "bugprone-exception-escape");
171 CheckFactories.registerCheck<FloatLoopCounterCheck>(
172 "bugprone-float-loop-counter");
173 CheckFactories.registerCheck<FoldInitTypeCheck>(
"bugprone-fold-init-type");
174 CheckFactories.registerCheck<ForwardDeclarationNamespaceCheck>(
175 "bugprone-forward-declaration-namespace");
176 CheckFactories.registerCheck<ForwardingReferenceOverloadCheck>(
177 "bugprone-forwarding-reference-overload");
178 CheckFactories.registerCheck<ImplicitWideningOfMultiplicationResultCheck>(
179 "bugprone-implicit-widening-of-multiplication-result");
180 CheckFactories.registerCheck<InaccurateEraseCheck>(
181 "bugprone-inaccurate-erase");
182 CheckFactories.registerCheck<IncorrectEnableIfCheck>(
183 "bugprone-incorrect-enable-if");
184 CheckFactories.registerCheck<IncorrectEnableSharedFromThisCheck>(
185 "bugprone-incorrect-enable-shared-from-this");
186 CheckFactories.registerCheck<UnintendedCharOstreamOutputCheck>(
187 "bugprone-unintended-char-ostream-output");
188 CheckFactories.registerCheck<ReturnConstRefFromParameterCheck>(
189 "bugprone-return-const-ref-from-parameter");
190 CheckFactories.registerCheck<StdExceptionBaseclassCheck>(
191 "bugprone-std-exception-baseclass");
192 CheckFactories.registerCheck<SwitchMissingDefaultCaseCheck>(
193 "bugprone-switch-missing-default-case");
194 CheckFactories.registerCheck<IncDecInConditionsCheck>(
195 "bugprone-inc-dec-in-conditions");
196 CheckFactories.registerCheck<IncorrectRoundingsCheck>(
197 "bugprone-incorrect-roundings");
198 CheckFactories.registerCheck<InfiniteLoopCheck>(
"bugprone-infinite-loop");
199 CheckFactories.registerCheck<IntegerDivisionCheck>(
200 "bugprone-integer-division");
201 CheckFactories.registerCheck<InvalidEnumDefaultInitializationCheck>(
202 "bugprone-invalid-enum-default-initialization");
203 CheckFactories.registerCheck<LambdaFunctionNameCheck>(
204 "bugprone-lambda-function-name");
205 CheckFactories.registerCheck<MacroParenthesesCheck>(
206 "bugprone-macro-parentheses");
207 CheckFactories.registerCheck<MacroRepeatedSideEffectsCheck>(
208 "bugprone-macro-repeated-side-effects");
209 CheckFactories.registerCheck<MisleadingSetterOfReferenceCheck>(
210 "bugprone-misleading-setter-of-reference");
211 CheckFactories.registerCheck<MisplacedOperatorInStrlenInAllocCheck>(
212 "bugprone-misplaced-operator-in-strlen-in-alloc");
213 CheckFactories.registerCheck<MisplacedPointerArithmeticInAllocCheck>(
214 "bugprone-misplaced-pointer-arithmetic-in-alloc");
215 CheckFactories.registerCheck<MisplacedWideningCastCheck>(
216 "bugprone-misplaced-widening-cast");
217 CheckFactories.registerCheck<MoveForwardingReferenceCheck>(
218 "bugprone-move-forwarding-reference");
219 CheckFactories.registerCheck<MultiLevelImplicitPointerConversionCheck>(
220 "bugprone-multi-level-implicit-pointer-conversion");
221 CheckFactories.registerCheck<MultipleNewInOneExpressionCheck>(
222 "bugprone-multiple-new-in-one-expression");
223 CheckFactories.registerCheck<MultipleStatementMacroCheck>(
224 "bugprone-multiple-statement-macro");
225 CheckFactories.registerCheck<NondeterministicPointerIterationOrderCheck>(
226 "bugprone-nondeterministic-pointer-iteration-order");
227 CheckFactories.registerCheck<OptionalValueConversionCheck>(
228 "bugprone-optional-value-conversion");
229 CheckFactories.registerCheck<PointerArithmeticOnPolymorphicObjectCheck>(
230 "bugprone-pointer-arithmetic-on-polymorphic-object");
231 CheckFactories.registerCheck<RedundantBranchConditionCheck>(
232 "bugprone-redundant-branch-condition");
233 CheckFactories.registerCheck<NarrowingConversionsCheck>(
234 "bugprone-narrowing-conversions");
235 CheckFactories.registerCheck<NoEscapeCheck>(
"bugprone-no-escape");
236 CheckFactories.registerCheck<NonZeroEnumToBoolConversionCheck>(
237 "bugprone-non-zero-enum-to-bool-conversion");
238 CheckFactories.registerCheck<NotNullTerminatedResultCheck>(
239 "bugprone-not-null-terminated-result");
240 CheckFactories.registerCheck<ParentVirtualCallCheck>(
241 "bugprone-parent-virtual-call");
242 CheckFactories.registerCheck<PosixReturnCheck>(
"bugprone-posix-return");
243 CheckFactories.registerCheck<RandomGeneratorSeedCheck>(
244 "bugprone-random-generator-seed");
245 CheckFactories.registerCheck<RawMemoryCallOnNonTrivialTypeCheck>(
246 "bugprone-raw-memory-call-on-non-trivial-type");
247 CheckFactories.registerCheck<ReservedIdentifierCheck>(
248 "bugprone-reserved-identifier");
249 CheckFactories.registerCheck<SharedPtrArrayMismatchCheck>(
250 "bugprone-shared-ptr-array-mismatch");
251 CheckFactories.registerCheck<SignalHandlerCheck>(
"bugprone-signal-handler");
252 CheckFactories.registerCheck<SignedBitwiseCheck>(
"bugprone-signed-bitwise");
253 CheckFactories.registerCheck<SignedCharMisuseCheck>(
254 "bugprone-signed-char-misuse");
255 CheckFactories.registerCheck<SizeofContainerCheck>(
256 "bugprone-sizeof-container");
257 CheckFactories.registerCheck<SizeofExpressionCheck>(
258 "bugprone-sizeof-expression");
259 CheckFactories.registerCheck<SpuriouslyWakeUpFunctionsCheck>(
260 "bugprone-spuriously-wake-up-functions");
261 CheckFactories.registerCheck<StandaloneEmptyCheck>(
262 "bugprone-standalone-empty");
263 CheckFactories.registerCheck<StdNamespaceModificationCheck>(
264 "bugprone-std-namespace-modification");
265 CheckFactories.registerCheck<StringConstructorCheck>(
266 "bugprone-string-constructor");
267 CheckFactories.registerCheck<StringIntegerAssignmentCheck>(
268 "bugprone-string-integer-assignment");
269 CheckFactories.registerCheck<StringLiteralWithEmbeddedNulCheck>(
270 "bugprone-string-literal-with-embedded-nul");
271 CheckFactories.registerCheck<StringviewNullptrCheck>(
272 "bugprone-stringview-nullptr");
273 CheckFactories.registerCheck<SuspiciousEnumUsageCheck>(
274 "bugprone-suspicious-enum-usage");
275 CheckFactories.registerCheck<SuspiciousIncludeCheck>(
276 "bugprone-suspicious-include");
277 CheckFactories.registerCheck<SuspiciousMemoryComparisonCheck>(
278 "bugprone-suspicious-memory-comparison");
279 CheckFactories.registerCheck<SuspiciousMemsetUsageCheck>(
280 "bugprone-suspicious-memset-usage");
281 CheckFactories.registerCheck<SuspiciousMissingCommaCheck>(
282 "bugprone-suspicious-missing-comma");
283 CheckFactories.registerCheck<SuspiciousReallocUsageCheck>(
284 "bugprone-suspicious-realloc-usage");
285 CheckFactories.registerCheck<SuspiciousSemicolonCheck>(
286 "bugprone-suspicious-semicolon");
287 CheckFactories.registerCheck<SuspiciousStringCompareCheck>(
288 "bugprone-suspicious-string-compare");
289 CheckFactories.registerCheck<SuspiciousStringviewDataUsageCheck>(
290 "bugprone-suspicious-stringview-data-usage");
291 CheckFactories.registerCheck<SwappedArgumentsCheck>(
292 "bugprone-swapped-arguments");
293 CheckFactories.registerCheck<TaggedUnionMemberCountCheck>(
294 "bugprone-tagged-union-member-count");
295 CheckFactories.registerCheck<TerminatingContinueCheck>(
296 "bugprone-terminating-continue");
297 CheckFactories.registerCheck<ThrowKeywordMissingCheck>(
298 "bugprone-throw-keyword-missing");
299 CheckFactories.registerCheck<ThrowingStaticInitializationCheck>(
300 "bugprone-throwing-static-initialization");
301 CheckFactories.registerCheck<TooSmallLoopVariableCheck>(
302 "bugprone-too-small-loop-variable");
303 CheckFactories.registerCheck<UncheckedOptionalAccessCheck>(
304 "bugprone-unchecked-optional-access");
305 CheckFactories.registerCheck<UncheckedStringToNumberConversionCheck>(
306 "bugprone-unchecked-string-to-number-conversion");
307 CheckFactories.registerCheck<UndefinedMemoryManipulationCheck>(
308 "bugprone-undefined-memory-manipulation");
309 CheckFactories.registerCheck<UndelegatedConstructorCheck>(
310 "bugprone-undelegated-constructor");
311 CheckFactories.registerCheck<UnhandledCodePathsCheck>(
312 "bugprone-unhandled-code-paths");
313 CheckFactories.registerCheck<UnhandledSelfAssignmentCheck>(
314 "bugprone-unhandled-self-assignment");
315 CheckFactories.registerCheck<UnhandledExceptionAtNewCheck>(
316 "bugprone-unhandled-exception-at-new");
317 CheckFactories.registerCheck<UniquePtrArrayMismatchCheck>(
318 "bugprone-unique-ptr-array-mismatch");
319 CheckFactories.registerCheck<CrtpConstructorAccessibilityCheck>(
320 "bugprone-crtp-constructor-accessibility");
321 CheckFactories.registerCheck<UnsafeFunctionsCheck>(
322 "bugprone-unsafe-functions");
323 CheckFactories.registerCheck<UnsafeToAllowExceptionsCheck>(
324 "bugprone-unsafe-to-allow-exceptions");
325 CheckFactories.registerCheck<UnusedLocalNonTrivialVariableCheck>(
326 "bugprone-unused-local-non-trivial-variable");
327 CheckFactories.registerCheck<UnusedRaiiCheck>(
"bugprone-unused-raii");
328 CheckFactories.registerCheck<UnusedReturnValueCheck>(
329 "bugprone-unused-return-value");
330 CheckFactories.registerCheck<UseAfterMoveCheck>(
"bugprone-use-after-move");
331 CheckFactories.registerCheck<VirtualNearMissCheck>(
332 "bugprone-virtual-near-miss");
340static ClangTidyModuleRegistry::Add<bugprone::BugproneModule>
341 X(
"bugprone-module",
"Adds checks for bugprone code constructs.");
static ClangTidyModuleRegistry::Add< altera::AlteraModule > X("altera-module", "Adds Altera FPGA OpenCL lint checks.")
volatile int BugproneModuleAnchorSource