[PATCH] D97567: [clang-tidy] performance-* checks: Also allow allow member expressions to be used in a const manner.
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 12 08:28:54 PDT 2021
njames93 accepted this revision.
njames93 added a comment.
This revision is now accepted and ready to land.
LGTM, but with a very minor nit.
================
Comment at: clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp:49
declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef");
+ auto MemberExprOfVar = memberExpr(has(DeclRefToVar));
+ auto DeclRefToVarOrMemberExprOfVar =
----------------
Can you use `hasObjectExpression` instead of `has` here, Its a bit more explicit in what we are matching.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97567/new/
https://reviews.llvm.org/D97567
More information about the cfe-commits
mailing list