hokein added inline comments.
================ Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:68 bool VisitMemberExpr(MemberExpr *E) { - report(E->getMemberLoc(), E->getFoundDecl().getDecl()); + // Instead of the FieldDecl for MemberExpr, we report the Decl of + // the corresponding record. This is done in order to report ---------------- I'd rephrase something like -- A member expr implies a usage of the class type (e.g. to prevent inserting a header of base class when using base members from a derived object). ================ Comment at: clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp:182 + testWalk("struct Base { int a; }; struct $explicit^Derived : public Base {};", + "void fun(Derived& d) { d.^a; }"); } ---------------- can you add more test cases (the AST node is a bit different among the following cases) to make sure our code handle all of them? - `Derived foo(); foo().^a;` - `Derived& foo(); foo().^a;` - `Derived().^a;` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139087/new/ https://reviews.llvm.org/D139087 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits