[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-04-22 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3f1c2bf1712c: [clangd] go-to-def on names in comments etc that are used nearby. (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75479/

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-04-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 259295. sammccall marked 15 inline comments as done. sammccall added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75479/new/ https://reviews.llvm.org/D75479 Files: clang

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-04-20 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks, Sam, this looks great! Comment at: clang-tools-extra/clangd/SourceCode.cpp:883 +static bool isLikelyIdentifier(llvm::StringRef Word, StringRef Before, +

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-04-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 258193. sammccall added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75479/new/ https://reviews.llvm.org/D75479 Files: clang-tools-extra/clangd/SourceCode.cpp clang-tools-ext

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-04-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added a comment. OK, I think this is probably finally good for another round - it's pretty well merged with the index-based version, and the common parts are pulled out to SourceCode and tested. I couldn't resist adding support for backtick-i

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-04-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 258187. sammccall added a comment. Add tests for SpelledWord Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75479/new/ https://reviews.llvm.org/D75479 Files: clang-tools-extra/clangd/SourceCode.cpp clang-

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-04-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 258097. sammccall added a comment. Merge with existing heuristic, extracting SpelledWord struct for the analysis. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75479/new/ https://reviews.llvm.org/D75479 File

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-04-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 257989. sammccall added a comment. rebase - finally getting back to this Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75479/new/ https://reviews.llvm.org/D75479 Files: clang-tools-extra/clangd/XRefs.cpp

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-03-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added a comment. > I'll make a proposal on https://github.com/clangd/clangd/issues/241 for a bit > more visibility. OK, I wrote a bunch of stuff there (twice, laptop crashed, grr...) I'll put this briefly on hold to see what you/others think

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-03-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D75479#1908774 , @nridge wrote: > This method only returns `Bar::uniqueMethodName()` because it's closer in > terms of distance Yeah, missing data is definitely bad: - not finding results makes the feature feel flaky or un

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Here's a test case that gives a less desirable result with this approach than D72874 : struct Foo { void uniqueMethodName(); }; struct Bar { void uniqueMethodName(); }; // Will call u^niqueMethodName() on t. template

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-03-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for putting this together, this is really neat and will indeed complement D72874 nicely! I have one high-level comment about the interface, the rest are nits. Comment at: clang-tools-extra/clangd/XRefs.cpp:337 +

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-03-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: nridge. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This is intended as a companion to (and is inspired by) D72874