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

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 26 02:34:08 PST 2025


felipepiovezan 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?

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


More information about the llvm-commits mailing list