[cfe-commits] [PATCH] PR12917: fix lambda mangling within templates

Richard Smith richard at metafoo.co.uk
Mon Jul 16 15:28:04 PDT 2012


Hi,

As PR12917 notes, the mangling of lambads within templates is currently
wrong -- not only do we not follow the ABI, we sometimes give the same
mangled name to multiple lambdas. We use the templated declaration as the
mangling context rather than the instantiation, and we don't take into
account that the mangling number can depend on the number of template
arguments if the template is variadic.

The attached patch fixes this by delaying the computation of the mangling
information for a lambda in a dependent context until after instantiation.

Please review!

Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120716/7c065dc7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mangle-lambdas.diff
Type: application/octet-stream
Size: 7419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120716/7c065dc7/attachment.obj>


More information about the cfe-commits mailing list