[PATCH] Fix crash-on-invalid bug in template instantiation.

Manuel Klimek klimek at google.com
Thu Jun 25 13:24:31 PDT 2015


On Thu, Jun 25, 2015 at 1:23 PM Meador Inge <meadori at gmail.com> wrote:

> This fix LGTM, but I do wonder about one thing.  The following pattern
> seems to occur all over `Sema`:
>
>   InstantiatingTemplate Inst(*this, PointOfInstantiation, Decl);
>     if (Inst.isInvalid())
>       ...
>
> For example, in `Sema::InstantiateEnum`.  Why aren't we marking decls
> invalid in those other places?
>

That is exactly what Richard gets at with the solution being to swap the
check up a bit instead.


>
>
> http://reviews.llvm.org/D10622
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150625/3c7fe35b/attachment.html>


More information about the cfe-commits mailing list