================
@@ -13,8 +13,8 @@
 using namespace lldb_dap;
 
 BreakpointBase::BreakpointBase(DAP &d, const llvm::json::Object &obj)
-    : dap(d), condition(std::string(GetString(obj, "condition"))),
-      hitCondition(std::string(GetString(obj, "hitCondition"))) {}
+    : dap(d), condition(std::string(GetString(obj, "condition").value_or(""))),
----------------
da-viper wrote:

I did try that before, but I doesn't work because at the position the compiler 
sees it as an initializer list. and `llvm::StringRef` does not have an 
initializer-list constructor. 

in the previous fuction 
`GetString(..... llvm::StringRef default_value = { } )` here it is treated as 
llvm::StringRef{} and can infer it.   



https://github.com/llvm/llvm-project/pull/129919
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to