[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

Fabian Keßler via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 14 16:36:23 PST 2022


Febbe added a comment.

I have a problem with lambdas capturing by copy implicitly (`[=]()...`). It seems like, that child nodes are not reachable via a MatchFinder unless they are spelled in source. I actually don't know how to prevent a fix elegantly: My proposed idea is, to check the source location of the capture list for each lambda and check, if the declRefExpr is part of it... . This is bug prone, and possibly slow.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137205



More information about the cfe-commits mailing list