[cfe-commits] [PATCH] Array exception type decay to pointer automatically

Richard Smith richard at metafoo.co.uk
Tue Nov 20 12:47:35 PST 2012


Hi,

On Tue, Nov 20, 2012 at 1:54 AM, WenHan Gu (谷汶翰) <wenhan.gu at gmail.com> wrote:
> Hi all,
>
> I've done the patch and testcase to fix PR14338.
> http://llvm.org/bugs/show_bug.cgi?id=14388
>
> Here's the patch, please review:
> http://llvm.org/bugs/attachment.cgi?id=9574&action=diff
>
>
> Is that okay to commit?

A matching update is needed in SemaTemplateInstantiateDecl. Perhaps
you could put this logic into CheckSepcifiedExceptionType (and either
return the modified type or pass it through by reference)? One of the
checks in  CheckSpecifiedExceptionType also needs updating. With your
patch, we still reject this:

struct S {
  void f() throw (S[10]);
};

... but we should accept it, because the type 'S' is supposed to be
considered as complete in exception specifications inside its body.




More information about the cfe-commits mailing list