[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 07:15:25 PST 2020


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp:143
+          Result.Nodes.getNodeAs<CXXCtorInitializer>("ctorInit")) {
+    if (auto *Member = CtorInit->getMember()) {
+      if (!Member->hasInClassInitializer() ||
----------------
Eugene.Zelenko wrote:
> Could it be const auto *?
This shouldn't be auto anyway. Also the reason its ``auto *`` and not ``const auto *`` is because that's the qualified type getMember returns. But in this example as I'm not modifying I could add a const qualifier


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

https://reviews.llvm.org/D72448





More information about the cfe-commits mailing list