[PATCH] D89277: [clangd] Add $/dumpMemoryTree LSP extension

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 14 09:10:12 PDT 2020


kadircet added a comment.

In D89277#2329947 <https://reviews.llvm.org/D89277#2329947>, @sammccall wrote:

> (sorry out today and haven't looked at code yet)

no worries it is a prototype, I wouldn't spend time looking at the implementation until we agree on the interaction :D
OTHO, checking out the lit test for output would probably be useful.

> If it's a custom method, I think it should return the data as a json structure - the client already has to have custom support to invoke it, displaying the result isn't much extra work.

SGTM. WDYT about a json object in the form of:

  interface MemoryTreeNode {
    name: string;
    totalSize: int;
    children?: Node[];
  };



> And I would really love to add a tree view to vscode, I think it wouldn't be hard (vs call hierarchy: no laziness and no direction-flipping) and could be reused for an AST viewer.

right, vscode already has APIs for it, https://code.visualstudio.com/api/extension-guides/tree-view.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89277/new/

https://reviews.llvm.org/D89277



More information about the cfe-commits mailing list