[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:23:48 PDT 2026
https://github.com/Teemperor created https://github.com/llvm/llvm-project/pull/201075
This source triggers the `-Wc++20-designator` warning as we're still using C++ 17.
>From 02c919a1cec07b5674d69fa4e27ce3843198c61c 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 | 103 +++++++++++-------
1 file changed, 62 insertions(+), 41 deletions(-)
diff --git a/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp b/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
index 50c37dcd4568e..6444cf32c5d50 100644
--- a/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
+++ b/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
@@ -276,59 +276,80 @@ 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