Instantiate local class at the end of its definition

Michael Park mcypark at gmail.com
Tue Sep 23 14:33:28 PDT 2014


I tried adding *LocalInstantiationScope* around
*PerformPendingInstantiation*, like so:

// A static constexpr member function of a local class can be used in
> // a constexpr expression right after the local class' definition.
> // We need to instantiate them now, otherwise it may be too late.
> LocalInstantiationScope Local(SemaRef);
> SemaRef.PerformPendingInstantiations(/*LocalOnly=*/true);
> Local.Exit();


but it didn't seem to work. I'm not sure what I'm missing here. Could you
give me a hint please?

Thanks

On 25 August 2014 01:30, Richard Smith <richard at metafoo.co.uk> wrote:

> It would be better to save and restore the pending local instantiations
> around the calls to instantiate the class body and its members, as we do
> elsewhere when we perform local pending instantiations.
>
>
> On Fri, Aug 22, 2014 at 2:41 AM, Michael Park <mcypark at gmail.com> wrote:
>
>> Fixes http://llvm.org/bugs/show_bug.cgi?id=20625
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140923/d28a1e4a/attachment.html>


More information about the cfe-commits mailing list