Commit 1fe50b446bd1c6bb6852df6d62160fea561e4d35

Devon Loehr 2024-07-16T20:12:06

Make implicit `this` capture explicit When declaring a lambda with a value-capture default [=, ...], the this pointer is implicitly captured by value as well. This results in potentially-unintuitive behavior and has been deprecated in C++20. It produces a warning in newer versions of clang (https://reviews.llvm.org/D142639). This CL prevents the warning by explicitly `this` for each lambda. To maintain compatibility with previous C++ standards, it also removes the = capture default and captures each variable explicitly. It does not change the compiled code at all, since it's just removing some syntactic sugar. Bug: chromium:351004963, angleproject:42266730 Change-Id: I0f17a442262e2da22a1951d590291806554e66ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5714410 Auto-Submit: Devon Loehr <dloehr@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>