[PATCH] D51311: (WIP) Type hierarchy

2018-08-29 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/Protocol.h:891 + + std::vector Parents; + ilya-biryukov wrote: > What is the proposal to add children (i.e. overriden methods) to the > hierarchy? > This seems like a place where we might want to have multiple re

[PATCH] D51311: (WIP) Type hierarchy

2018-08-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a subscriber: sammccall. ilya-biryukov added inline comments. Comment at: clangd/XRefs.cpp:669 + const CXXMethodDecl *Candidate) { + // FIXME: How do I determine if Method overrides Candidate? + kadircet wrote: > ilya

[PATCH] D51311: (WIP) Type hierarchy

2018-08-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/ProtocolHandlers.cpp:70 Register("textDocument/hover", &ProtocolCallbacks::onHover); + Register("textDocument/typeHierarchy", &ProtocolCallbacks::onTypeHierarchy); Register("textDocument/documentSymbol", &ProtocolCallback

[PATCH] D51311: (WIP) Type hierarchy

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for looking into this. Would be cool to get this supported after the proposal is finalized. Comment at: clangd/Protocol.h:891 + + std::vector Parents; + What is the proposal to add children (i.e. overriden methods) to the

[PATCH] D51311: (WIP) Type hierarchy

2018-08-28 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/Protocol.h:889 + // Does this node implement the method targeted by the request? + bool DeclaresMethod; + kadircet wrote: > I think comment and the name is in contradiction here, do you mean > DefinesMethod? Act

[PATCH] D51311: (WIP) Type hierarchy

2018-08-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Protocol.h:889 + // Does this node implement the method targeted by the request? + bool DeclaresMethod; + I think comment and the name is in contradiction here, do you mean DefinesMethod? Co

[PATCH] D51311: (WIP) Type hierarchy

2018-08-27 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, ioeric, ilya-biryukov. This is a work in progress patch to support an eventual "get type hierarchy" request that does not exist in the LSP today. I only plan to support getting parent types (i.e. ba