When we're creating an expression for an integral template argument of
enumeration type, we were generating an integer literal implicitly
casted to the appropriate enumeration type. However, later checks on
that expression would strip the implicit cast.
This commit tweaks the lame hack, by creating an explicit cast instead
of an implicit cast. The right answer is to introduce a
SubstNonTypeTemplateParmExpr expression that acts like the substituted
result. I'll investigate that soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125818
91177308-0d34-0410-b5e6-
96231b3b80d8