[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347498: [clangd] Add support for hierarchical documentSymbol (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52311 Files:

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 175130. ilya-biryukov added a comment. - Handle 'using namespace' in printName - Do not mix-in symbols with locations from other files. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 Files: clangd/AST.cpp clangd/AST.h clan

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: unittests/clangd/FindSymbolsTests.cpp:442 +SymNameRange(Main.range("decl"), + AllOf(WithName("f"), WithKind(SymbolKind::Method), +SymN

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 175116. ilya-biryukov added a comment. - Do not drop anonymous enums Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 Files: clangd/AST.cpp clangd/AST.h clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdSe

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: unittests/clangd/FindSymbolsTests.cpp:442 +SymNameRange(Main.range("decl"), + AllOf(Wit

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 174960. ilya-biryukov added a comment. - Remove accidentally added qualifiers Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 Files: clangd/AST.cpp clangd/AST.h clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/FindSymbols.cpp:190 + index::SymbolInfo SymInfo = index::getSymbolInfo(&ND); + SymbolKind SK = indexSymbolKindToSymbolKind(SymInfo.Kind); sammccall wrote: > may want to add a FIXME here: per the tests, i

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 174958. ilya-biryukov marked 15 inline comments as done. ilya-biryukov added a comment. - Address comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 Files: clangd/AST.cpp clangd/AST.h clangd/ClangdLSPServer.cpp clan

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Very nice! Mostly just a few style/structure nits. Comment at: clangd/AST.cpp:69 +std::string printName(const NamedDecl &ND) { + const NamedDecl *NameSource = &ND; + std::string Name = llvm::to_string(NameSource->getDeclName()); jus

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-10-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Another annoyance to fix: - 'using namespace' are shown as '' Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-10-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 171067. ilya-biryukov added a comment. - Improve traversal of the AST. - Update the tests. - Add a fallback to SymbolInformation (flat structure) if the client does not support the hierarhical reponse. Still some work left to do: - Do not drop the qua

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-10-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D52311#1255876, @simark wrote: > I just tried this, this looks very promising! It should help build our > outline view in a much more robust way than we do currently. > A nit for the final patch, I would suggest omitting the fields tha

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-10-04 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. I just tried this, this looks very promising! It should help build our outline view in a much more robust way than we do currently. A nit for the final patch, I would suggest omitting the fields that are optional, like `children` (when the list is empty) and `deprecated

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-09-20 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. Ohh awesome, I didn't know the LSP supported that. I'll try it it Theia when I have time. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. Posted to make sure it's visible that I've started doing this. Still need to update the tests and check for the capability from the client (and fallback to SymbolInformation if client does not support the new implemen

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: ioeric, sammccall, simark. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clan