29class LLVMModule :
public ClangTidyModule {
31 void addCheckFactories(ClangTidyCheckFactories &CheckFactories)
override {
32 CheckFactories.registerCheck<readability::ElseAfterReturnCheck>(
33 "llvm-else-after-return");
34 CheckFactories.registerCheck<LLVMHeaderGuardCheck>(
"llvm-header-guard");
35 CheckFactories.registerCheck<IncludeOrderCheck>(
"llvm-include-order");
36 CheckFactories.registerCheck<readability::NamespaceCommentCheck>(
37 "llvm-namespace-comment");
38 CheckFactories.registerCheck<PreferIsaOrDynCastInConditionalsCheck>(
39 "llvm-prefer-isa-or-dyn-cast-in-conditionals");
40 CheckFactories.registerCheck<PreferRegisterOverUnsignedCheck>(
41 "llvm-prefer-register-over-unsigned");
42 CheckFactories.registerCheck<PreferStaticOverAnonymousNamespaceCheck>(
43 "llvm-prefer-static-over-anonymous-namespace");
44 CheckFactories.registerCheck<readability::QualifiedAutoCheck>(
45 "llvm-qualified-auto");
46 CheckFactories.registerCheck<TwineLocalCheck>(
"llvm-twine-local");
47 CheckFactories.registerCheck<TypeSwitchCaseTypesCheck>(
48 "llvm-type-switch-case-types");
49 CheckFactories.registerCheck<UseNewMlirOpBuilderCheck>(
50 "llvm-use-new-mlir-op-builder");
51 CheckFactories.registerCheck<UseRangesCheck>(
"llvm-use-ranges");
52 CheckFactories.registerCheck<UseVectorUtilsCheck>(
"llvm-use-vector-utils");
55 ClangTidyOptions getModuleOptions()
override {
56 ClangTidyOptions Options;
57 Options.
CheckOptions[
"llvm-qualified-auto.AddConstToQualified"] =
"false";
58 Options.
CheckOptions[
"llvm-else-after-return.WarnOnUnfixable"] =
"false";
59 Options.
CheckOptions[
"llvm-else-after-return.WarnOnConditionVariables"] =
68static ClangTidyModuleRegistry::Add<LLVMModule>
X(
"llvm-module",
69 "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.