[cfe-dev] Initialized lambda captures and clang

David Majnemer david.majnemer at gmail.com
Sun Sep 8 01:46:34 PDT 2013


I have a few questions about the state of initialized lambda captures wrt
clang:

First off, is anybody actively working on these? If so, I'll just slink
away quietly :)

If not, I want to see if this sounds reasonable:

The way I think of these in my head is as-if they have an implicit
specifier of 'auto' as they haven't got a declarator specifier to parse.

My thoughts thus far:
- Invent a DeclSpec corresponding to the auto
- Make a Declarator with our new DeclSpec
- Give the Declarator our previously parsed identifier with SetIdentifier
- Using the lambda body's scope, use HandleDeclarator to introduce the
identifier to the scope
- Attach the init-capture's initializer using AddInitializerToDecl
- ???
- Profit

While more than this must happen, I wanted to see if I was on-track here.

Thanks
-- 
David Majnemer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130908/c3755b20/attachment.html>


More information about the cfe-dev mailing list