Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decomposition declarator bindings cannot be used in lambda captures #49430

Closed
tbaederr opened this issue Apr 23, 2021 · 2 comments
Closed

Decomposition declarator bindings cannot be used in lambda captures #49430

tbaederr opened this issue Apr 23, 2021 · 2 comments
Labels
bugzilla Issues migrated from bugzilla c++17 clang:frontend Language frontend issues, e.g. anything involving "Sema" invalid Resolved as invalid, i.e. not a bug

Comments

@tbaederr
Copy link
Contributor

Bugzilla Link 50086
Version trunk
OS Linux
CC @zygoloid

Extended Description

Consider the code at https://godbolt.org/z/qa8q75vG6

The first sample (with struct S) is even taken from clang/test/SemaCXX/cxx1z-decomposition.cpp

The problem seems to be that in SemaLambda.cpp, the code requires the LookupResult to return a VarDecl, but it returns a BindingDecl.

@tbaederr
Copy link
Contributor Author

I guess this comment in SemaExpr.cpp is relevant:

  // FIXME: Support lambda-capture of BindingDecls, once CWG actually
  // decides how that's supposed to work.

I guess this was being done on purpose in 1879f10

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@EugeneZelenko EugeneZelenko added invalid Resolved as invalid, i.e. not a bug clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Aug 23, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Aug 23, 2022

@llvm/issue-subscribers-clang-frontend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++17 clang:frontend Language frontend issues, e.g. anything involving "Sema" invalid Resolved as invalid, i.e. not a bug
Projects
None yet
Development

No branches or pull requests

3 participants