Please also add a test that IRGen copes with this when it appears as a
condition (for instance, on the LHS of another ?: operator) -- we have
special handling for that which has had problems with throw-expressions in
the past. Otherwise, LGTM, thanks!

On Thu, May 30, 2013 at 10:48 PM, David Majnemer
<[email protected]>wrote:

> ToT clang incorrectly does not allow the following:
>
> int x = true ? (throw 1) : 2;
>
> The problem is exists because we don't see beyond the parens.
> This, in turn, causes us to believe that we are choosing between void and
> int which we diagnose as an error.
>
> The attached patch will allow clang to see the 'throw' inside the parens.
>
> --
> David Majnemer
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to