When compiling Objective-C++, name lookup uses the C++ lookup behavior that skips the filtering of non-implicit-self references, and will use a shadowed name that matches the type. As a result implicit ivar access behavior differs between Objective-C and Objective-C++, which can impact local access but also block captures.
This addresses the issue #56193 as reported on Github.
Unfortunately it appears the behavior has differed for 11 years (since the original fix for ObjC was applied in 2011).