NoQ added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.cpp:45 + // Treat lambda capture by reference as a form of taking a reference. + return llvm::any_of(LE->captures(), [Var](const LambdaCapture &C) { + return C.capturesVariable() && C.getCaptureKind() == LCK_ByRef && ---------------- xazax.hun wrote: > Will this cover generalized captures? E.g.: > ``` > int i; > auto lambda = [foo=&i] { return *foo; }; > ``` This one's good; we still react on the operator & inside the init-expression. This one's worse however: `[&foo = i]` (i had such test for the next patch but not for this patch). Let me patch this up. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96215/new/ https://reviews.llvm.org/D96215 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits