[cfe-commits] [Patch review request] Binary type traits

John McCall rjmccall at apple.com
Mon Sep 27 05:56:31 PDT 2010


On Sep 20, 2010, at 6:30 PM, Douglas Gregor wrote:
> I'd really rather not add a new expression type just for the purpose of type-checking __is_convertible_to. How about we synthesize appropriate expressions instead, e.g., a DeclRefExpr to a synthesized variable, or a CallExpr to a synthesized function with an appropriate return type?

Actually, I think there are several places in the AST where "opaque expression of fixed type and l-valueness" would be very convenient — mostly with copies, e.g. with synthesized array copies, caught-exception copies, etc.

John.



More information about the cfe-commits mailing list