[cfe-dev] [PATCH] Add Microsoft's handling of exception specifications

Martin Vejnár avakar at ratatanek.cz
Sat Aug 28 04:30:41 PDT 2010


On 8/26/2010 4:42 PM, Douglas Gregor wrote:
> On Aug 24, 2010, at 3:19 AM, Martin Vejnár wrote:
>> In any case, I'm attaching another patch that does what you suggest.
>
> I think the patch is okay, but please provide test cases that explore
> how Visual C++ actually checks compatibility of exception
> specifications, to make sure that we're modeling what Visual C++ does
> rather than having some different non-conforming behavior.

I've added a simple test case to the patch. Note that the patch is not 
trying to replicate the exact behavior of MSVC with respect to exception 
specifications, it only addresses the particular case that causes clang 
to fail on Microsoft's <new>.

In particular, the patch keeps the following code ill-formed:

     void (*q)() throw(int) = 0;
     void (*p)() throw(float) = q;

whereas MSVC accepts it.
-- 
Martin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ms-except-spec-noopt.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100828/57d223fb/attachment.ksh>


More information about the cfe-dev mailing list