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

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 19 07:39:10 PST 2022


njames93 marked an inline comment as done.
njames93 added inline comments.


================
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;
----------------
LegalizeAdulthood wrote:
> 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;`
No need to explicitly override the d'tor


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