[Lldb-commits] [lldb] [lldb][NFC] Don't use C++20 designated initializer (PR #201075)
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 2 02:47:25 PDT 2026
https://github.com/Teemperor updated https://github.com/llvm/llvm-project/pull/201075
>From b8fabc6d53a8d40d377e25ebd5dfe6983232959b Mon Sep 17 00:00:00 2001
From: Raphael Isemann <rise at apple.com>
Date: Tue, 2 Jun 2026 10:04:28 +0100
Subject: [PATCH] [lldb][NFC] Don't use C++20 designated initializer
This source triggers the `-Wc++20-designator` warning as we're still
using C++ 17.
---
.../SymbolFile/DWARF/XcodeSDKModuleTests.cpp | 75 +++++++++----------
1 file changed, 34 insertions(+), 41 deletions(-)
diff --git a/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp b/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
index 50c37dcd4568e..7e428d5a8217a 100644
--- a/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
+++ b/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
@@ -276,59 +276,52 @@ TEST_P(SDKPathParsingMultiparamTests, TestSDKPathFromDebugInfo) {
SDKPathParsingTestData sdkPathParsingTestCases[] = {
/// Multiple CUs with a mix of internal and public SDKs
- {.input_sdk_paths =
- {"/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk",
- "/invalid/path/to/something.invalid.sdk",
- "/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.0.Internal.sdk",
- "/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk"},
- .expect_mismatch = true,
- .expect_internal_sdk = true,
- .expect_sdk_path_pattern = "Internal.sdk"},
+ {/* input_sdk_paths = */ {"/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk",
+ "/invalid/path/to/something.invalid.sdk",
+ "/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.0.Internal.sdk",
+ "/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk"},
+ /* expect_mismatch = */ true,
+ /* expect_internal_sdk = */ true,
+ /* expect_sdk_path_pattern = */ "Internal.sdk"},
/// Single CU with a public SDK
- {.input_sdk_paths =
- {"/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk"},
- .expect_mismatch = false,
- .expect_internal_sdk = false,
- .expect_sdk_path_pattern = "MacOSX10.9.sdk"},
+ {/* input_sdk_paths = */ {"/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk"},
+ /* expect_mismatch = */ false,
+ /* expect_internal_sdk = */ false,
+ /* expect_sdk_path_pattern = */ "MacOSX10.9.sdk"},
/// Single CU with an internal SDK
- {.input_sdk_paths =
- {"/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.0.Internal.sdk"},
- .expect_mismatch = false,
- .expect_internal_sdk = true,
- .expect_sdk_path_pattern = "Internal.sdk"},
+ {/* input_sdk_paths = */ {"/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.0.Internal.sdk"},
+ /* expect_mismatch = */ false,
+ /* expect_internal_sdk = */ true,
+ /* expect_sdk_path_pattern = */ "Internal.sdk"},
/// Two CUs with an internal SDK each
- {.input_sdk_paths =
- {"/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.0.Internal.sdk",
- "/Library/Developer/CommandLineTools/SDKs/iPhoneOS12.9.Internal.sdk"},
- .expect_mismatch = false,
- .expect_internal_sdk = true,
- .expect_sdk_path_pattern = "Internal.sdk"},
+ {/* input_sdk_paths = */ {"/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.0.Internal.sdk",
+ "/Library/Developer/CommandLineTools/SDKs/iPhoneOS12.9.Internal.sdk"},
+ /* expect_mismatch = */ false,
+ /* expect_internal_sdk = */ true,
+ /* expect_sdk_path_pattern = */ "Internal.sdk"},
/// Two CUs with a public (non-CommandLineTools) SDK each
- {.input_sdk_paths = {"/Path/To/SDKs/iPhoneOS14.1.sdk",
- "/Path/To/SDKs/MacOSX11.3.sdk"},
- .expect_mismatch = false,
- .expect_internal_sdk = false,
- .expect_sdk_path_pattern = "iPhoneOS14.1.sdk"},
+ {/* input_sdk_paths = */ {"/Path/To/SDKs/iPhoneOS14.1.sdk", "/Path/To/SDKs/MacOSX11.3.sdk"},
+ /* expect_mismatch = */ false,
+ /* expect_internal_sdk = */ false,
+ /* expect_sdk_path_pattern = */ "iPhoneOS14.1.sdk"},
/// One CU with CommandLineTools and the other a public SDK
- {.input_sdk_paths =
- {"/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.1.sdk",
- "/Path/To/SDKs/MacOSX11.3.sdk"},
- .expect_mismatch = false,
- .expect_internal_sdk = false,
- .expect_sdk_path_pattern = "iPhoneOS14.1.sdk"},
+ {/* input_sdk_paths = */ {"/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.1.sdk",
+ "/Path/To/SDKs/MacOSX11.3.sdk"},
+ /* expect_mismatch = */ false,
+ /* expect_internal_sdk = */ false,
+ /* expect_sdk_path_pattern = */ "iPhoneOS14.1.sdk"},
/// One CU with CommandLineTools and the other an internal SDK
- {.input_sdk_paths =
- {"/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.1.sdk",
- "/Path/To/SDKs/MacOSX11.3.Internal.sdk"},
- .expect_mismatch = true,
- .expect_internal_sdk = true,
- .expect_sdk_path_pattern = "iPhoneOS14.1.Internal.sdk"},
+ {/* input_sdk_paths = */ {"/Library/Developer/CommandLineTools/SDKs/iPhoneOS14.1.sdk",
+ "/Path/To/SDKs/MacOSX11.3.Internal.sdk"},
+ /* expect_mismatch = */ true,
+ /* expect_internal_sdk = */ true,
+ /* expect_sdk_path_pattern = */ "iPhoneOS14.1.Internal.sdk"},
};
INSTANTIATE_TEST_SUITE_P(SDKPathParsingTests, SDKPathParsingMultiparamTests,
More information about the lldb-commits
mailing list