ashgti wrote:

> This code seems quite repetitive. Would it be possible to have a 
> `Capabilities` enum and then representing the actual values by something like 
> `map<Capability, bool>` (with std::nullopt replaced by removing the 
> capability from the map). Or even `map<string, bool>` if you don't need to 
> access the capabilities individually (very often)? And maybe the handlers 
> don't even need to return the map, but just a list/vector of "new" 
> capabilities that they enable?

Done. Converted these into `std::set<(Adapter|Client)Feature>` sets for the 
`Capabilities` type and for the `InitializeRequestArguments`. I adjusted the 
RequestHandler classes to return a `std::set<AdapterFeature>` now as well.

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

Reply via email to