Skip to content

Decomposition declarator bindings cannot be used in lambda captures #49430

Closed
@tbaederr

Description

@tbaederr
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"invalidResolved as invalid, i.e. not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions