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

Peter Collingbourne peter at pcc.me.uk
Wed Dec 15 07:09:13 PST 2010


On Tue, Dec 14, 2010 at 07:55:48AM -0800, Douglas Gregor wrote:
> 
> 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!

Thanks, r121862.

-- 
Peter



More information about the cfe-commits mailing list