https://wg21.link/P2173 is making its way through WG21 currently and has not been formally adopted yet. This feature provides very useful functionality in that you can specify attributes on the various function *declarations* generated by a lambda expression, where the current C++ grammar only allows attributes which apply to the various function *types* so generated.
This patch implements P2173 on the assumption that it will be adopted by WG21 with this syntax because there are no other syntactic locations to put an attribute on a lambda that will unambiguously appertain to the declaration rather than the type. Given the large number of function declaration attributes compared to function type attributes, such a construct is needed. The proposal has been approved in principle by EWG and is scheduled to go through Core wording review, so there is a strong likelihood it will be adopted, at least with this syntax. When WG21 adopts the proposal, the diagnostic can be changed as appropriate. In the unlikely event that WG21 decides not to adopt the proposal, this syntax is still a conforming extension.
I need this functionality in a downstream fork of Clang that is currently sliding some attributes written in the type position to instead apply to the declaration.