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.
Details
- Reviewers
cor3ntin aaron.ballman - Group Reviewers
Restricted Project - Commits
- rG0eb06cb3aa27: [Sema] Stop stripping CV quals from *this captures in lambdas
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Can you add a summary, I realize folks can goto the release notes edit and see the bug report and then go look it up but at least a cursory summary is a little more reviewer friendly.
LGTM. Triple checking with @hubert.reinterpretcast for conformance but I'm pretty sure that's correct.
Can we also add the test from the bug report as a regression test, it looks like the existing test are basically covering the same thing but I have seen stranger bugs so it would be good to explicitly cover it.
LGTM aside from a minor nit, though I have some minor concerns that we may silently break people's code by calling different overloads or instantiating templates differently so I wonder if this is a potentially breaking change or not. I think we can leave it out of the potentially breaking changes section unless we get some reports about a behavior change organically during this release cycle?
clang/lib/Sema/SemaExprCXX.cpp | ||
---|---|---|
1138 | This looks like an accidental formatting mistake that can be backed out. |
My rule of thumb here is since we change behavior to match other compilers it's probably not too disruptive.
clang/lib/Sema/SemaExprCXX.cpp | ||
---|---|---|
1138 | ah, thanks for catching it! |
This looks like an accidental formatting mistake that can be backed out.