Hi,
<div><br></div><div>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.</div>
<div><br></div><div>The attached patch fixes this by delaying the computation of the mangling information for a lambda in a dependent context until after instantiation.</div><div><br></div><div>Please review!</div><div><br>
</div><div>Thanks,</div><div>Richard</div>