[PATCH] D128715: [clang-tidy] Fix confusable identifiers interaction with DeclContext

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 1 05:22:51 PDT 2022


aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM aside from some minor style nits.



================
Comment at: clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.cpp:130-132
+    if (ND1->getAccess() != AS_private && isMemberOf(ND1, RD0)) {
+      return true;
+    }
----------------



================
Comment at: clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.cpp:135-137
+    if (ND0->getAccess() != AS_private && isMemberOf(ND0, RD1)) {
+      return true;
+    }
----------------



================
Comment at: clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.cpp:142-145
+  else if (DC1->Encloses(DC0))
+    return mayShadowImpl(ND1, ND0);
+  else
+    return false;
----------------



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

https://reviews.llvm.org/D128715



More information about the cfe-commits mailing list