[clang] [clang] Fix implicit integer conversion for opaque enums declared in class templates (PR #121039)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 6 06:43:42 PST 2025
=?utf-8?q?André?= Brand <andre.brand at mailbox.org>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/121039 at github.com>
erichkeane wrote:
> > Thanks for the PR. Can you update the commit message to be more descriptive?
> > I'm not sure the fix is sufficient.
> > I think most of the checks done in `ActOnEnumBody` should be (re) performed on instantiation.
> > Maybe we should instead
> >
> > * Add a new `BuildEnumBody` function, move most (all?) the implementation of `ActOnEnumBody` to that
> > * call `BuildEnumBody` from both `ActOnEnumBody` and `RebuildEnumType`
> >
> > That would not only fix the crash but also the fact that we are seemingly missing a lot of diagnostics
> > https://godbolt.org/z/17dTW4dEe
>
> @erichkeane wdyt?
I agree, it seems that the instantiation of the enum is missing quite a bit when it comes to diagnostics. We should definitely do some sort of analysis to ensure that we're getting the same diagnostics at both points.
That said, I am ok with doing this NOW, as long as the author promises to do the rest in a followup patch ASAP.
https://github.com/llvm/llvm-project/pull/121039
More information about the cfe-commits
mailing list