hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:128 bool VisitDeclRefExpr(DeclRefExpr *DRE) { - report(DRE->getLocation(), DRE->getFoundDecl()); + if (DRE->getFoundDecl()->isCXXClassMember()) { + report(DRE->getLocation(), DRE->getQualifier()->getAsRecordDecl(), ---------------- We have two handled cases, it is not quite obvious to spot the difference between them. It would be nice to add a comment clarifying this is for accessing the static member instance. ================ Comment at: clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp:117 testWalk("namespace ns { int $explicit^x; }", "int y = ns::^x;"); - testWalk("struct S { static int $explicit^x; };", "int y = S::^x;"); + testWalk("struct $implicit^S { static int x; };", "int y = S::^x;"); // Canonical declaration only. ---------------- can you add a testcase for static-member-call as well? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148552/new/ https://reviews.llvm.org/D148552 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits