[Lldb-commits] [lldb] [lldb][lldb-dap] Migrate ScopesRequest to structured types (PR #138116)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Mon May 12 13:10:27 PDT 2025


================
@@ -269,17 +271,16 @@ struct Capabilities {
 };
 llvm::json::Value toJSON(const Capabilities &);
 
-enum PresentationHint : unsigned {
-  ePresentationHintNormal,
-  ePresentationHintEmphasize,
-  ePresentationHintDeemphasize,
-};
-llvm::json::Value toJSON(PresentationHint hint);
-
 /// A `Source` is a descriptor for source code. It is returned from the debug
 /// adapter as part of a `StackFrame` and it is used by clients when specifying
 /// breakpoints.
 struct Source {
+  enum PresentationHint : unsigned {
+    ePresentationHintNormal,
+    ePresentationHintEmphasize,
+    ePresentationHintDeemphasize,
+  };
----------------
ashgti wrote:

style nit: I think in lldb enums are usually kept in the same namespace and we should make the type more specific like `ScopePresentationHint` and `eScopePresentationHintNormal`, but I'll defer @JDevlieghere this.

https://github.com/llvm/llvm-project/pull/138116


More information about the lldb-commits mailing list