[PATCH] D151594: [clang-tidy] Optimize misc-confusable-identifiers

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 07:37:10 PDT 2023


serge-sans-paille accepted this revision.
serge-sans-paille added a comment.
This revision is now accepted and ready to land.

LGTM with a minor nit. Thanks for the optimization!



================
Comment at: clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.cpp:124
+    if (ND0->getAccess() != AS_private && isMemberOf(DC0, DC1))
+      return true;
+  }
----------------
I <3 this simplification. It's more difficult to understand though, could you add a small content along those lines: `if any of the declaration is a non-private member of the other declaration, it's shadowed by the former`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151594



More information about the cfe-commits mailing list