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

Francois Pichet pichet2000 at gmail.com
Tue Aug 24 02:51:10 PDT 2010


I don't think it is necessary to add a MsExceptSpec flag in
LangOptions nor a -fms-except-spec compiler switch.
Simply add the following test for MSVC compatibility:
  if (getLangOptions().Microsoft)

Because if we add an option or switch for every microsoft extension,
it is never going to end.

On Tue, Aug 24, 2010 at 5:18 AM, Martin Vejnár <avakar at ratatanek.cz> wrote:
> Hi,
>
> I'm attaching a patch that adds an option -fms-except-spec that makes sema
> treat exception specifications with at least one type-id as if the
> exception specification was missing. In other words,
>
>    void foo() throw(...);
>    void foo() throw(std::bad_alloc);
>
> will now parse without errors if -fms-except-spec is given. This in turn
> makes it possible to parse sources that include Microsoft's <new> header.
>
> I'm very new to clang, sorry if I've missed something. Best regards,
> --
> Martin
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>




More information about the cfe-dev mailing list