[PATCH] D116875: [clang-tidy] Add performance-inefficient-array-traversal check

Richard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 16 13:59:09 PST 2022


LegalizeAdulthood added a comment.

Except for a couple nits, LGTM.



================
Comment at: clang-tools-extra/clang-tidy/performance/InefficientArrayTraversalCheck.h:25-26
+public:
+  InefficientArrayTraversalCheck(StringRef Name, ClangTidyContext *Context)
+      : ClangTidyCheck(Name, Context) {}
+  void registerMatchers(ast_matchers::MatchFinder *Finder) override;
----------------
If you're not doing anything different, I believe you can just do
`using ClangTidyCheck::ClangTidyCheck;`

Also, shouldn't you be explicitly overriding the d'tor?
`~InefficientArrayTraversalCheck() override = default;`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116875/new/

https://reviews.llvm.org/D116875



More information about the cfe-commits mailing list