[clang] [clang] improve diagnostics for enums (PR #204682)

Matthias Wippich via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 18 16:55:40 PDT 2026


Tsche wrote:

Theoretically this could visit `SubstNonTypeTemplateParmExpr` instead to _only_ see through constant template arguments. 

However, I think it's clearer if we try printing enumerators for expressions such as `(SomeEnum)0` iff we have an enumerator with that value. This could be extended to also cover expressions such as `(SomeEnum)(0)`, `SomeEnum(0)` and `SomeEnum{0}` - please advise whether that's desirable.

https://github.com/llvm/llvm-project/pull/204682


More information about the cfe-commits mailing list