[Sema] Stop stripping CV quals from *this captures in lambdas
authorRoy Jacobson <roi.jacobson1@gmail.com>
Tue, 14 Mar 2023 19:25:54 +0000 (21:25 +0200)
committerRoy Jacobson <roi.jacobson1@gmail.com>
Wed, 29 Mar 2023 20:11:51 +0000 (23:11 +0300)
commit0eb06cb3aa2700508c20da28f22ff91e7b82a436
treef37ea325f4d6a08d459768de659735a8d10a0668
parent5ce83caba59d7c470e1a12a8d6ef63c33d98e177
[Sema] Stop stripping CV quals from *this captures in lambdas

It appears we've been incorrectly stripping CV qualifiers when capturing `this` by value inside lambdas.
This patch simply removes the CV stripping code as discussed.

Closes https://github.com/llvm/llvm-project/issues/50866

Reviewed By: #clang-language-wg, cor3ntin, aaron.ballman

Differential Revision: https://reviews.llvm.org/D146168
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaExprCXX.cpp
clang/test/SemaCXX/cxx1z-lambda-star-this.cpp