[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-02-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D99134#3311363 , @jloser wrote: > Would love to see this cherry-picked into the llvm 14 release branch if > possible! I believe there is a bug in github that you can use to request that. This just landed as 0bff3a96502264

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-02-18 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0bff3a965022: Lambdas are not necessarily locals. This resolves DR48250. (authored by davidstone, committed by erichkeane). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-02-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D99134#3331359 , @davidstone wrote: > In D99134#3331259 , @rsmith wrote: > >> Looks good. Do you need someone to land this for you? > > Yes, I do. I'll do that for you, working on it

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-02-17 Thread David Stone via Phabricator via cfe-commits
davidstone added a comment. In D99134#3331259 , @rsmith wrote: > Looks good. Do you need someone to land this for you? Yes, I do. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99134/new/ https://reviews.ll

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-02-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. Looks good. Do you need someone to land this for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99134/new/ https://reviews.llvm.org/D99134 ___ c

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-02-17 Thread David Stone via Phabricator via cfe-commits
davidstone updated this revision to Diff 409710. davidstone added a comment. Add unit test requested by Richard Smith Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99134/new/ https://reviews.llvm.org/D99134 Files: clang/lib/Sema/SemaTemplateInst

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-02-10 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. LGTM. Please also add something like this as a unit test: In D99134#2643441 , @rsmith wrote: > template int x = [](auto){ return T(); }.operator()(T()); > int y = x; Repository: rG LLVM Githu

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-02-10 Thread Joe Loser via Phabricator via cfe-commits
jloser added a comment. Would love to see this cherry-picked into the llvm 14 release branch if possible! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99134/new/ https://reviews.llvm.org/D99134 ___ cfe

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-02-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. From my look, this seems to fix the problem, and covers the case that Richard brought up, and I have no comments, so I think I'm happy with it. Please give Richard/Aaron ~24 hrs to ta

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2022-01-18 Thread David Stone via Phabricator via cfe-commits
davidstone added a comment. Is there anything else I need to do to help move this forward? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99134/new/ https://reviews.llvm.org/D99134 ___ cfe-commits mailing

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2021-12-16 Thread David Stone via Phabricator via cfe-commits
davidstone added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99134/new/ https://reviews.llvm.org/D99134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2021-11-08 Thread David Stone via Phabricator via cfe-commits
davidstone updated this revision to Diff 385508. davidstone added a comment. Take into account Richard's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99134/new/ https://reviews.llvm.org/D99134 Files: clang/lib/Sema/SemaTemplateInstanti

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2021-03-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Ah, I think I see how we get here. I think this fix might possibly break a case such as: template int x = [](auto){ return T(); }.operator()(T()); int y = x; ... where transforming the call to `operator()` might end up looking for the transformed version of the lamb

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2021-03-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Hm, do we ever call `FindInstantiatedDecl` on a lambda class in the first place? It seems plausible to me that this condition is unreachable. But to the extent that it's reachable, it seems mostly correct: a lambda expression appearing in a non-dependent context might st

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2021-03-22 Thread David Stone via Phabricator via cfe-commits
davidstone added a comment. The previous commit is https://github.com/llvm/llvm-project/commit/a86bc00, and I don't understand enough of what the other code is doing to know if anything else needs to be fixed. I'd also like to add in a test to ensure this doesn't regress in the future, but I'm

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2021-03-22 Thread David Stone via Phabricator via cfe-commits
davidstone added a comment. It looks like this change was originally added 9 years ago with a commit message of "Lambda closure types are always considered to be like "local" classes, even if they are not within a function scope. Teach template instantiation to treat them as such, and make sure

[PATCH] D99134: Lambdas are not necessarily locals. This resolves DR48250.

2021-03-22 Thread David Stone via Phabricator via cfe-commits
davidstone created this revision. davidstone requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D99134 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp Index: clang/lib/