30class LLVMModule :
public ClangTidyModule {
32 void addCheckFactories(ClangTidyCheckFactories &CheckFactories)
override {
33 CheckFactories.registerCheck<readability::ElseAfterReturnCheck>(
34 "llvm-else-after-return");
35 CheckFactories.registerCheck<LLVMHeaderGuardCheck>(
"llvm-header-guard");
36 CheckFactories.registerCheck<IncludeOrderCheck>(
"llvm-include-order");
37 CheckFactories.registerCheck<readability::NamespaceCommentCheck>(
38 "llvm-namespace-comment");
39 CheckFactories.registerCheck<PreferIsaOrDynCastInConditionalsCheck>(
40 "llvm-prefer-isa-or-dyn-cast-in-conditionals");
41 CheckFactories.registerCheck<PreferRegisterOverUnsignedCheck>(
42 "llvm-prefer-register-over-unsigned");
43 CheckFactories.registerCheck<PreferStaticOverAnonymousNamespaceCheck>(
44 "llvm-prefer-static-over-anonymous-namespace");
45 CheckFactories.registerCheck<readability::QualifiedAutoCheck>(
46 "llvm-qualified-auto");
47 CheckFactories.registerCheck<RedundantCastingCheck>(
48 "llvm-redundant-casting");
49 CheckFactories.registerCheck<TwineLocalCheck>(
"llvm-twine-local");
50 CheckFactories.registerCheck<TypeSwitchCaseTypesCheck>(
51 "llvm-type-switch-case-types");
52 CheckFactories.registerCheck<UseNewMlirOpBuilderCheck>(
53 "llvm-use-new-mlir-op-builder");
54 CheckFactories.registerCheck<UseRangesCheck>(
"llvm-use-ranges");
55 CheckFactories.registerCheck<UseVectorUtilsCheck>(
"llvm-use-vector-utils");
58 ClangTidyOptions getModuleOptions()
override {
59 ClangTidyOptions Options;
60 Options.
CheckOptions[
"llvm-qualified-auto.AddConstToQualified"] =
"false";
61 Options.
CheckOptions[
"llvm-else-after-return.WarnOnUnfixable"] =
"false";
62 Options.
CheckOptions[
"llvm-else-after-return.WarnOnConditionVariables"] =
71static ClangTidyModuleRegistry::Add<LLVMModule>
X(
"llvm-module",
72 "Adds LLVM lint checks.");
static ClangTidyModuleRegistry::Add< LLVMModule > X("llvm-module", "Adds LLVM lint checks.")
volatile int LLVMModuleAnchorSource
OptionMap CheckOptions
Key-value mapping used to store check-specific options.