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