================
@@ -695,4 +695,23 @@ llvm::json::Value toJSON(const EvaluateResponseBody &Body) 
{
   return result;
 }
 
+bool fromJSON(const llvm::json::Value &Params, LocationsArguments &Args,
+              llvm::json::Path Path) {
+  json::ObjectMapper O(Params, Path);
+  return O && O.map("locationReference", Args.locationReference);
+}
+
+llvm::json::Value toJSON(const LocationsResponseBody &Body) {
+  json::Object result{{"source", Body.source}, {"line", Body.line}};
----------------
ashgti wrote:

Can we add an assert that `line` is `!= LLDB_INVALID_LINE_NUMBER`, that 
indicates the response wasn't filled in correctly.

https://github.com/llvm/llvm-project/pull/171099
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to