[cfe-commits] [PATCH] Sema: have BuildExpressionFromIntegralTemplateArgument produce well-formed IntegerLiterals

Douglas Gregor dgregor at apple.com
Tue Dec 14 07:55:48 PST 2010


On Nov 25, 2010, at 10:12 PM, Peter Collingbourne wrote:

> Hi,
> 
> BuildExpressionFromIntegralTemplateArgument can produce malformed
> IntegerLiterals with an EnumType if the template parameter type
> is an EnumType.  This breaks the AST printer which expects all
> IntegerLiterals to have a plain integer type.  Instead, give the
> IntegerLiteral the enum's promotion type and wrap in an implicit cast
> to the EnumType.
> 
> OK to commit?

Looks great, please commit!

	- Doug



More information about the cfe-commits mailing list