From f935ff6caaa1bb4cd41674cbe388e311b83606be Mon Sep 17 00:00:00 2001 From: "Golubev, Andrey" Date: Mon, 10 Nov 2025 15:29:45 +0000 Subject: [PATCH] [NFC] DWARFVerifier: use C-style array instead of brace-enclosed init list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Historically, MSVC would issue a warning seeing a brace-enclosed initializer list variable being used as a range. A quick fix is to use a C-style array instead which is more or less an equivalent form. Unfortunately, a lot of time has passed since this patch was originally added to our downstream. Thus, the original warning is long lost. The patch is trivial and harmless enough to be applied nonetheless. Co-authored-by: Jörn Schöndube --- llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index 693454e249945..440ad4f1268c7 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -1523,8 +1523,8 @@ void DWARFVerifier::verifyNameIndexAttribute( } if (AttrEnc.Index == dwarf::DW_IDX_parent) { - constexpr static auto AllowedForms = {dwarf::Form::DW_FORM_flag_present, - dwarf::Form::DW_FORM_ref4}; + constexpr static dwarf::Form AllowedForms[] = { + dwarf::Form::DW_FORM_flag_present, dwarf::Form::DW_FORM_ref4}; if (!is_contained(AllowedForms, AttrEnc.Form)) { ErrorCategory.Report("Unexpected NameIndex Abbreviation", [&]() { error() << formatv(