38class PerformanceModule :
public ClangTidyModule {
40 void addCheckFactories(ClangTidyCheckFactories &CheckFactories)
override {
41 CheckFactories.registerCheck<AvoidEndlCheck>(
"performance-avoid-endl");
42 CheckFactories.registerCheck<EnumSizeCheck>(
"performance-enum-size");
43 CheckFactories.registerCheck<ExpensiveValueOrCheck>(
44 "performance-expensive-value-or");
45 CheckFactories.registerCheck<PreferSingleCharOverloadsCheck>(
46 "performance-faster-string-find");
47 CheckFactories.registerCheck<ForRangeCopyCheck>(
48 "performance-for-range-copy");
49 CheckFactories.registerCheck<ImplicitConversionInLoopCheck>(
50 "performance-implicit-conversion-in-loop");
51 CheckFactories.registerCheck<InefficientAlgorithmCheck>(
52 "performance-inefficient-algorithm");
53 CheckFactories.registerCheck<InefficientStringConcatenationCheck>(
54 "performance-inefficient-string-concatenation");
55 CheckFactories.registerCheck<InefficientVectorOperationCheck>(
56 "performance-inefficient-vector-operation");
57 CheckFactories.registerCheck<MoveConstArgCheck>(
58 "performance-move-const-arg");
59 CheckFactories.registerCheck<MoveConstructorInitCheck>(
60 "performance-move-constructor-init");
61 CheckFactories.registerCheck<NoAutomaticMoveCheck>(
62 "performance-no-automatic-move");
63 CheckFactories.registerCheck<NoIntToPtrCheck>(
"performance-no-int-to-ptr");
64 CheckFactories.registerCheck<NoexceptDestructorCheck>(
65 "performance-noexcept-destructor");
66 CheckFactories.registerCheck<NoexceptMoveConstructorCheck>(
67 "performance-noexcept-move-constructor");
68 CheckFactories.registerCheck<NoexceptSwapCheck>(
69 "performance-noexcept-swap");
70 CheckFactories.registerCheck<PreferSingleCharOverloadsCheck>(
71 "performance-prefer-single-char-overloads");
72 CheckFactories.registerCheck<StringViewConversionsCheck>(
73 "performance-string-view-conversions");
74 CheckFactories.registerCheck<TriviallyDestructibleCheck>(
75 "performance-trivially-destructible");
76 CheckFactories.registerCheck<TypePromotionInMathFnCheck>(
77 "performance-type-promotion-in-math-fn");
78 CheckFactories.registerCheck<UnnecessaryCopyInitializationCheck>(
79 "performance-unnecessary-copy-initialization");
80 CheckFactories.registerCheck<UnnecessaryValueParamCheck>(
81 "performance-unnecessary-value-param");
82 CheckFactories.registerCheck<UseStdMoveCheck>(
"performance-use-std-move");
89static ClangTidyModuleRegistry::Add<PerformanceModule>
90 X(
"performance-module",
"Adds performance checks.");
volatile int PerformanceModuleAnchorSource