[PATCH] D96215: [clang-tidy] Aliasing: Add support for lambda captures.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 5 18:34:55 PDT 2021
NoQ added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.cpp:45-48
+ return llvm::any_of(LE->captures(), [Var](const LambdaCapture &C) {
+ return C.capturesVariable() && C.getCaptureKind() == LCK_ByRef &&
+ C.getCapturedVar() == Var;
+ });
----------------
aaron.ballman wrote:
> Should this use `capturesByRef()` from https://reviews.llvm.org/D101787?
Yes and https://reviews.llvm.org/D101787 already converts this code to use `capturesByRef()` as soon as it introduces it!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96215/new/
https://reviews.llvm.org/D96215
More information about the cfe-commits
mailing list