mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 20:36:04 +00:00

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