[PATCH] D104112: [clang-tidy] cppcoreguidelines-avoid-init-default-constructors: a new check

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 11 06:39:08 PDT 2021


Eugene.Zelenko added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidInitDefaultConstructorsCheck.h:28
+  bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
+    return LangOpts.CPlusPlus;
+  }
----------------
Shouldn't this check be enabled in C++11 or newer?


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-avoid-init-default-constructors.rst:6
+
+This check flags constructors which are only initializing class members.
+Such constructors can be omitted, because the initialization could be
----------------
Please synchronize this statement with Release Notes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104112



More information about the cfe-commits mailing list