Skip to content
Commit 03007d79 authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

Sema: have BuildExpressionFromIntegralTemplateArgument produce well-formed IntegerLiterals

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.

llvm-svn: 121862
parent 0a2c4168
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment