Author: Ebuka Ezike
Date: 2025-05-15T11:13:19+01:00
New Revision: e3867cb07ed1ed319609fbea0ce15f40e2a0efad

URL: 
https://github.com/llvm/llvm-project/commit/e3867cb07ed1ed319609fbea0ce15f40e2a0efad
DIFF: 
https://github.com/llvm/llvm-project/commit/e3867cb07ed1ed319609fbea0ce15f40e2a0efad.diff

LOG: [NFC][lldb][lldb-dap] fix C++20 extension warning (#140031)

warning for designated initializers

introduced in commit  4ba8f4e

Added: 
    

Modified: 
    lldb/unittests/DAP/ProtocolTypesTest.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/unittests/DAP/ProtocolTypesTest.cpp 
b/lldb/unittests/DAP/ProtocolTypesTest.cpp
index 0c119bdb544d8..5d5125dc78fba 100644
--- a/lldb/unittests/DAP/ProtocolTypesTest.cpp
+++ b/lldb/unittests/DAP/ProtocolTypesTest.cpp
@@ -305,11 +305,12 @@ TEST(ProtocolTypesTest, Scope) {
   scope.endLine = 10;
   scope.endColumn = 20;
 
-  scope.source =
-      Source{.name = "testName",
-             .path = "/path/to/source",
-             .sourceReference = 12345,
-             .presentationHint = Source::eSourcePresentationHintNormal};
+  Source source;
+  source.name = "testName";
+  source.path = "/path/to/source";
+  source.sourceReference = 12345;
+  source.presentationHint = Source::eSourcePresentationHintNormal;
+  scope.source = source;
 
   llvm::Expected<Scope> deserialized_scope = roundtrip(scope);
   ASSERT_THAT_EXPECTED(deserialized_scope, llvm::Succeeded());
@@ -325,7 +326,6 @@ TEST(ProtocolTypesTest, Scope) {
   EXPECT_EQ(scope.endColumn, deserialized_scope->endColumn);
 
   EXPECT_THAT(deserialized_scope->source.has_value(), true);
-  const Source &source = scope.source.value();
   const Source &deserialized_source = deserialized_scope->source.value();
 
   EXPECT_EQ(source.path, deserialized_source.path);


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to