[PATCH] D139087: [include-cleaner] Handle base class member access from derived class.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 2 01:24:38 PST 2022


kadircet added inline comments.


================
Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:62
   bool VisitMemberExpr(MemberExpr *E) {
-    report(E->getMemberLoc(), E->getFoundDecl().getDecl());
+    // Instead of the FieldDecl for MemberExpr, we report the Decl of
+    // the corresponding record.
----------------
comment doesn't really say why. maybe include something along the lines `as we want to mark usage of most specific type (e.g. derived class, when using members from the base)`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139087



More information about the cfe-commits mailing list