[PATCH] Fix crash-on-invalid bug in template instantiation.
Manuel Klimek
klimek at google.com
Thu Jun 25 13:32:41 PDT 2015
On Thu, Jun 25, 2015 at 1:13 PM Richard Smith <richard at metafoo.co.uk> wrote:
> ================
> Comment at: lib/Sema/SemaTemplateInstantiate.cpp:1930-1939
> @@ -1929,12 +1929,12 @@
>
> // \brief Record the point of instantiation.
> if (MemberSpecializationInfo *MSInfo
> = Instantiation->getMemberSpecializationInfo()) {
> MSInfo->setTemplateSpecializationKind(TSK);
> MSInfo->setPointOfInstantiation(PointOfInstantiation);
> } else if (ClassTemplateSpecializationDecl *Spec
> = dyn_cast<ClassTemplateSpecializationDecl>(Instantiation)) {
> Spec->setTemplateSpecializationKind(TSK);
> Spec->setPointOfInstantiation(PointOfInstantiation);
> }
>
> ----------------
> Is it sufficient to move this block of code to after the bail-out below?
> It seems like the problem may be that we've done some amount of the
> instantiation work (storing the TSK on the specialization) before we bail
> out, and so the AST is left in an inconsistent state.
>
Doesn't work, we still crash...
>
> 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/5af6688e/attachment.html>
More information about the cfe-commits
mailing list