Skip to content

Commit e3867cb

Browse files
authored
[NFC][lldb][lldb-dap] fix C++20 extension warning (llvm#140031)
warning for designated initializers introduced in commit 4ba8f4e
1 parent 849ecbc commit e3867cb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lldb/unittests/DAP/ProtocolTypesTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,12 @@ TEST(ProtocolTypesTest, Scope) {
305305
scope.endLine = 10;
306306
scope.endColumn = 20;
307307

308-
scope.source =
309-
Source{.name = "testName",
310-
.path = "/path/to/source",
311-
.sourceReference = 12345,
312-
.presentationHint = Source::eSourcePresentationHintNormal};
308+
Source source;
309+
source.name = "testName";
310+
source.path = "/path/to/source";
311+
source.sourceReference = 12345;
312+
source.presentationHint = Source::eSourcePresentationHintNormal;
313+
scope.source = source;
313314

314315
llvm::Expected<Scope> deserialized_scope = roundtrip(scope);
315316
ASSERT_THAT_EXPECTED(deserialized_scope, llvm::Succeeded());
@@ -325,7 +326,6 @@ TEST(ProtocolTypesTest, Scope) {
325326
EXPECT_EQ(scope.endColumn, deserialized_scope->endColumn);
326327

327328
EXPECT_THAT(deserialized_scope->source.has_value(), true);
328-
const Source &source = scope.source.value();
329329
const Source &deserialized_source = deserialized_scope->source.value();
330330

331331
EXPECT_EQ(source.path, deserialized_source.path);

0 commit comments

Comments
 (0)