[llvm] [NFC] DWARFVerifier: use C-style array instead of brace-enclosed init list (PR #167328)

Andrei Golubev via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 26 02:37:57 PST 2025


andrey-golubev wrote:

> > > What was the warning that you were seeing here? I a surprised no other compilers emit it.
> > 
> > 
> > Unfortunately, I do not know the exact one (the original patch wasn't mine). All I found is that it apparently seems to be MSVC bug that doesn't consider `constexpr static auto AllowedForms = {dwarf::Form::DW_FORM_flag_present, dwarf::Form::DW_FORM_ref4};` to be "constant expression" due to the right-hand-side expression (I guess, it didn't like `constexpr auto` + the initializer list `{ ... }`?).
> > P.S.: actually, this is totally different from what I wrote in PR description!
> 
> I am hesitant to make code changes like this based on recollection. It would be nice to see the problem in practice before we merge this, maybe you can get compiler explorer to show us the issue?

Tried to look on godbolt, but to no avail (probably because it *is* msvc bug that's shipped in a particular version?). Fair, but from what i can tell this does not really change much so i still decided to upstream it.

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


More information about the llvm-commits mailing list