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

Attachment: ternary-paren-throw.diff
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to