[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 6 inline comments as done. nridge added a comment. I'm posting some partial responses because I have some questions (really just one, about fuzzy matching). In general the comments seem reasonable and I plan to address all of them. (I've marked some comments as done because I've a

[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] D69237: Refactor getDeclAtPosition() to use SelectionTree + targetDecl()

2019-10-31 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 227352. nridge marked 12 inline comments as done. nridge added a comment. Address latest comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69237/new/ https://reviews.llvm.org/D69237 Files: clang-tools-ex

[PATCH] D69237: Refactor getDeclAtPosition() to use SelectionTree + targetDecl()

2019-10-31 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1133 + DeclRelationSet Relations = + DeclRelation::TemplatePattern | DeclRelation::Alias; + auto Decls = getDeclAtPosition(AST, SourceLocationBeg, Relations); sammccall wrote: > A

[PATCH] D69237: Refactor getDeclAtPosition() to use SelectionTree + targetDecl()

2019-10-31 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb6429cdd65ff: Refactor getDeclAtPosition() to use SelectionTree + targetDecl() (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69237/new/

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-31 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:469 + auto &AddedLine = DiffedLines.back(); + for (auto Iter = AddedLine.Tokens.begin(); + Iter != AddedLine.Tokens.end();) { hokein wrote: > it took m

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-31 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 227374. nridge marked 3 inline comments as done. nridge added a comment. Addressed some nits and got existing tests to pass Will follow up with new tests in the next update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D67536: [clangd] Inactive regions support as an extension to semantic highlighting

2019-11-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 228959. nridge added a comment. Add unit tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67536/new/ https://reviews.llvm.org/D67536 Files: clang-tools-extra/clangd/ParsedAST.cpp clang-tools-extra/clangd

[PATCH] D67536: [clangd] Inactive regions support as an extension to semantic highlighting

2019-11-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:143 +for (const SourceRange &R : + AST.getPreprocessor().getPreprocessingRecord()->getSkippedRanges()) { + if (isInsideMainFile(R.getBegin(), SM)) { hokei

[PATCH] D67536: [clangd] Inactive regions support as an extension to semantic highlighting

2019-11-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 228960. nridge marked 11 inline comments as done. nridge added a comment. Address one minor remaining comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67536/new/ https://reviews.llvm.org/D67536 Files: cl

[PATCH] D67536: [clangd] Inactive regions support as an extension to semantic highlighting

2019-11-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.h:100 + const std::vector &getSkippedRanges() const { +return SkippedRanges; hokein wrote: > hokein wrote: > > Instead of adding new membe

[PATCH] D67536: [clangd] Inactive regions support as an extension to semantic highlighting

2019-11-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 229707. nridge added a comment. Support preamble as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67536/new/ https://reviews.llvm.org/D67536 Files: clang-tools-extra/clangd/CollectMacros.h clang-tools-

[PATCH] D67536: [clangd] Inactive regions support as an extension to semantic highlighting

2019-11-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:469 + auto &AddedLine = DiffedLines.back(); + for (auto Iter = AddedLine.Tokens.begin(); + Iter != AddedLine.Tokens.end();) { hokein wrote: > nridge wr

[PATCH] D67536: [clangd] Inactive regions support as an extension to semantic highlighting

2019-11-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 230195. nridge marked 4 inline comments as done. nridge added a comment. Address nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67536/new/ https://reviews.llvm.org/D67536 Files: clang-tools-extra/clangd/C

[PATCH] D67536: [clangd] Inactive regions support as an extension to semantic highlighting

2019-11-21 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb2e6c2b9954b: [clangd] Inactive regions support as an extension to semantic highlighting (authored by nridge). Changed prior to commit: https://reviews.llvm.org/D67536?vs=230195&id=230565#toc Repositor

[PATCH] D67537: [clangd] Client-side support for inactive regions

2019-11-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 230586. nridge added a comment. Clean up patch a bit and update tests as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67537/new/ https://reviews.llvm.org/D67537 Files: clang-tools-extra/clangd/clients/c

[PATCH] D67537: [clangd] Client-side support for inactive regions

2019-11-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:210 + isWholeLine: true, + // FIXME: Avoid hardcoding these colors. + light: { I'm open

[PATCH] D70727: [clangd] Keep go-to-definition working at the end of an identifier (fixes #194)

2019-11-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70727 Files: clang-tools-extra/c

[PATCH] D70727: [clangd] Keep go-to-definition working at the end of an identifier (fixes #194)

2019-11-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. By the way, may I get permissions to assign issues to myself (and make other such metadata changes to issues) on github? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70727/new/ https://reviews.llvm.org/D70727 __

[PATCH] D70740: [clangd] Find reference to template parameter in 'sizeof...' expression

2019-11-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70740 Files: clang-tools-extra/clangd/Fi

[PATCH] D70740: [clangd] Find reference to template parameter in 'sizeof...' expression

2019-11-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Fixes https://github.com/clangd/clangd/issues/213 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70740/new/ https://reviews.llvm.org/D70740 ___ cfe-commits mailing list cfe-commi

[PATCH] D70746: [clangd] Highlighting dependent types in more contexts

2019-11-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70746 Files: clang-tools-extra/clangd/Se

[PATCH] D70740: [clangd] Find reference to template parameter in 'sizeof...' expression

2019-11-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 231608. nridge added a comment. Address review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70740/new/ https://reviews.llvm.org/D70740 Files: clang-tools-extra/clangd/FindTarget.cpp clang-tools-ext

[PATCH] D70727: [clangd] Keep go-to-definition working at the end of an identifier (fixes #194)

2019-11-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge abandoned this revision. nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:153 + // allowing go-to-definition to work at the end of an identifier. + if (Result.empty() && Offset > 0) { +Result = getD

[PATCH] D70727: [clangd] Keep go-to-definition working at the end of an identifier (fixes #194)

2019-11-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D70727#1763781 , @hokein wrote: > In D70727#1760485 , @nridge wrote: > > > By the way, may I get permissions to assign issues to myself (and make > > other such metadata changes to issues

[PATCH] D70746: [clangd] Highlighting dependent types in more contexts

2019-11-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 231609. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70746/new/ https://reviews.llvm.org/D70746 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp clan

[PATCH] D70740: [clangd] Find reference to template parameter in 'sizeof...' expression

2019-12-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 232011. nridge added a comment. Add FindExplicitReferences test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70740/new/ https://reviews.llvm.org/D70740 Files: clang-tools-extra/clangd/FindTarget.cpp clang-

[PATCH] D70746: [clangd] Highlighting dependent types in more contexts

2019-12-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 232012. nridge added a comment. Address nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70746/new/ https://reviews.llvm.org/D70746 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp clang-tools-extr

[PATCH] D70740: [clangd] Find reference to template parameter in 'sizeof...' expression

2019-12-05 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1a4ee4c88f21: [clangd] Find reference to template parameter in 'sizeof...' expression (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D707

[PATCH] D70746: [clangd] Highlighting dependent types in more contexts

2019-12-05 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGde3dbc4f4166: [clangd] Highlighting dependent types in more contexts (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70746/new/ https://

[PATCH] D61842: [clangd] [WIP] [Not ready for review] Semantic highlighting

2019-12-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge abandoned this revision. nridge added a comment. Herald added a subscriber: usaxena95. Abandoning as all of the functionality in this prototype is now present in mainline (except for the ability to color declarations differently from references, which is blocked on a spec change as discus

[PATCH] D67537: [clangd] Client-side support for inactive regions

2019-12-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Review ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67537/new/ https://reviews.llvm.org/D67537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D71090: [clangd] Navigation from definition of template specialization to primary templateFixes https://github.com/clangd/clangd/issues/212.

2019-12-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71090 Files: clang-tools-extr

[PATCH] D71090: [clangd] Navigation from definition of template specialization to primary template

2019-12-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 232725. nridge marked 2 inline comments as done. nridge retitled this revision from "[clangd] Navigation from definition of template specialization to primary template Fixes https://github.com/clangd/clangd/issues/212."; to "[clangd] Navigation from definitio

[PATCH] D71090: [clangd] Navigation from definition of template specialization to primary template

2019-12-07 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe8716a6df7ab: [clangd] Navigation from definition of template specialization to primary… (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D71090: [clangd] Navigation from definition of template specialization to primary template

2019-12-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:240 +// it's more useful to navigate to the template declaration. +if (Preferred->getLocation() == IdentStartLoc) { + if (auto *CTSD = dyn_cast(Preferred)) { sammccall wrote

[PATCH] D71090: [clangd] Navigation from definition of template specialization to primary template

2019-12-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:240 +// it's more useful to navigate to the template declaration. +if (Preferred->getLocation() == IdentStartLoc) { + if (auto *CTSD = dyn_cast(Prefe

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. nridge updated this revision to Diff 232996. nridge added a comment. nridge edited the summary of

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 232996. nridge added a comment. Add github issue number Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71240/new/ https://reviews.llvm.org/D71240 Files: clang-tools-extra/clangd/FindTarget.cpp clang-tools-ex

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 232998. nridge added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71240/new/ https://reviews.llvm.org/D71240 Files: clang-tools-extra/clangd/FindTarget.cpp clang-tools-extra/clangd/XRef

[PATCH] D71345: [clangd] Fall back to selecting token-before-cursor if token-after-cursor fails.

2019-12-11 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. I tried to do a less general version of this (for go-to-definition only) in D70727 :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71345/new/ https://reviews.llvm.org/D71345 ___

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. `unique_ptr` is harder to get to work than it might appear at first blush :) Looking at the gcc 6 libstdc++ implementation as an example: the declared return type is not `T*`, but `unique_ptr::pointer`. The declaration of that is in turn: typedef typename _Pointer::ty

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 233680. nridge marked 7 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71240/new/ https://reviews.llvm.org/D71240 Files: clang-tools-ext

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 233681. nridge marked an inline comment as done. nridge added a comment. Fix a typo and address one remaining comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71240/new/ https://reviews.llvm.org/D71240 Fil

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:278 +}); +for (const NamedDecl *D : Decls) { + Outer.add(D, Flags); sammccall wrote: > sammccall wrote: > > can we make this function return the decls,

[PATCH] D71345: [clangd] Fall back to selecting token-before-cursor if token-after-cursor fails.

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D71345#1781141 , @sammccall wrote: > How do you feel about the approach here? I agree that having more of the logic centralized (in `SelectionTree`) is preferable to having it directly in a call site like `getDeclAtPosition`.

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGecaa9363303e: [clangd] Heuristically resolve dependent method calls (authored by nridge). Changed prior to commit: https://reviews.llvm.org/D71240?vs=233681&id=233698#toc Repository: rG LLVM Github M

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D71240#1782763 , @thakis wrote: > Probably needs the usual -fno-delayed-template-parsing workaround, see other > clangd tests. Thanks for the suggestion! Fix at https://reviews.llvm.org/D71444 Repository: rG LLVM Github Mo

[PATCH] D71444: [clangd] Fix Windows test failure by adding -fno-delayed-template-parsing to LocateSymbol.Ambiguous

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71444 Files: clang-tools-extra/clangd/unittests/XRefsTests.cpp

[PATCH] D71444: [clangd] Fix Windows test failure by adding -fno-delayed-template-parsing to LocateSymbol.Ambiguous

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG4f732a3d49ac: [clangd] Fix Windows test failure by adding -fno-delayed-template-parsing to… (authored by nridge). Reposit

[PATCH] D71240: [clangd] Heuristically resolve dependent method calls

2019-12-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D71240#1782828 , @nridge wrote: > In D71240#1782763 , @thakis wrote: > > > Probably needs the usual -fno-delayed-template-parsing workaround, see > > other clangd tests. > > > Thanks for

[PATCH] D71345: [clangd] Fall back to selecting token-before-cursor if token-after-cursor fails.

2019-12-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D71345#1783092 , @sammccall wrote: > (though personally I'd find it frustrating to have no way to target `b` in > `a+b+c`). (For completeness, there is a way to target `b` in `a+b+c`: by selecting `b` (such that your selectio

[PATCH] D71345: [clangd] Fall back to selecting token-before-cursor if token-after-cursor fails.

2019-12-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D71345#1783587 , @sammccall wrote: > Indeed, sorry - I meant that if we incorporated it into an LSP server, > there'd be no way to target it in methods that take a position rather than a > selection (go to defn, hover etc). A

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

2019-12-15 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Fixes https://github.com/clangd/clangd/issues/31 Repository: rG LLVM Github Monorepo https:/

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

2019-12-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 234446. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71533/new/ https://reviews.llvm.org/D71533 Files: clang-tools-extra/clangd/XRefs.cpp clang-tools-extra/c

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

2019-12-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added a comment. In D71533#1785376 , @kadircet wrote: > I think this requires changes in other places too, for example when querying > index for the children we rather want to query using the symbolid of tem

[PATCH] D71644: [clangd] Heuristically resolve dependent call through smart pointer type

2019-12-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Fixes https://github.com/clangd/clangd/issues/227 Repository: rG LLVM Github Monorepo https:

[PATCH] D71644: [clangd] Heuristically resolve dependent call through smart pointer type

2019-12-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:116 + // smart pointer type. + ASTContext *Ctx = hackyFindASTContext(T); + if (!Ctx) I don't intend for this function to be in the final

[PATCH] D71644: [clangd] Heuristically resolve dependent call through smart pointer type

2019-12-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Shopping around to other reviewers while Sam's OOO. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71644/new/ https://reviews.llvm.org/D71644 ___ cfe-commits mailing list cfe-com

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

2019-12-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 234784. nridge marked 4 inline comments as done. nridge added a comment. Address most review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71533/new/ https://reviews.llvm.org/D71533 Files: clang-tool

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

2019-12-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp:418 + EXPECT_THAT(*Result, + AllOf(WithName("S<0>"), WithKind(SymbolKind::Struct), Parents())); } kadircet

[PATCH] D75292: [clangd] Remove vsc-extension-quickstart.md from the vscode-clangd plugin

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa7c655f1480f: [clangd] Remove vsc-extension-quickstart.md from the vscode-clangd plugin (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D75286: [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 248598. nridge marked 4 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75286/new/ https://reviews.llvm.org/D75286 Files: clang-tools-ext

[PATCH] D75286: [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:215 /// to this function. -/// The `CheckMacroExpansion` parameter determines whether the function should -/// handle the case where the

[PATCH] D75716: [clangd] Have visibleNamespaces() and getEligiblePoints() take a LangOptions rather than a FormatStyle

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. These functions only use the FormatStyle to obtain a LangOptions via format::getFormattingLangOpts(), and some callers can more easil

[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] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added a comment. In D72874#1900648 , @sammccall wrote: > This reminds me: it's not completely obvious what set of "act on symbol under > the cursor" things this should (eventually) apply to. > I think not h

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 248630. nridge marked 16 inline comments as done. nridge added a comment. Rebase onto D75479 and address most review comments Comments remaining to be addressed: - revising the tests to exercise locateSymbolNamedTextuallyAt(

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:489 + Index->fuzzyFind(Req, [&](const Symbol &Sym) { +auto MaybeDeclLoc = +symbolLocationToLocation(Sym.CanonicalDeclaration, MainFilePath);

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:258 + +// For now, only consider exact name matches, including case. +// This is to avoid too many false positives. sammccall wrote: > nr

[PATCH] D75959: [clangd] Run clang-format on CodeComplete.cpp and SourceCodeTests.cpp

2020-03-10 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. I assume I can self-approve this kind of change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75959/new/ https://reviews.llvm.org/D75959 ___

[PATCH] D75959: [clangd] Run clang-format on CodeComplete.cpp and SourceCodeTests.cpp

2020-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. I assume I can self-approve t

[PATCH] D75716: [clangd] Have visibleNamespaces() and getEligiblePoints() take a LangOptions rather than a FormatStyle

2020-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 249495. nridge marked 6 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75716/new/ https://reviews.llvm.org/D75716 Files: clang-tools-ext

[PATCH] D75716: [clangd] Have visibleNamespaces() and getEligiblePoints() take a LangOptions rather than a FormatStyle

2020-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG445195ba6cee: [clangd] Have visibleNamespaces() and getEligiblePoints() take a LangOptions… (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D75959: [clangd] Run clang-format on CodeComplete.cpp and SourceCodeTests.cpp

2020-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG484402abaca2: [clangd] Run clang-format on CodeComplete.cpp and SourceCodeTests.cpp (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75959

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. I've started to update the patch to be in line with the direction discussed in the issue. @sammccall, how would you like to proceed logistically: - Do you plan to land (a possibly modified version of) D75479 ? - Or should I combine that

[PATCH] D75716: [clangd] Have visibleNamespaces() and getEligiblePoints() take a LangOptions rather than a FormatStyle

2020-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D75716#1916032 , @hubert.reinterpretcast wrote: > It looks like this is causing bot failures > (http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/1881/steps/build%20stage%201/logs/stdio): Sorry about that. Fix here:

[PATCH] D75969: [clangd] Link libClangDaemonTweaks to libClangFormat

2020-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. hubert.reinterpretcast added a comment. Thanks for the prompt response. It seems our fix attempts happened "concurrently" an

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 250018. nridge marked 9 inline comments as done. nridge added a comment. Herald added a subscriber: mgrang. - Remove fuzzy matching - Rebase to apply to head, taking only the parts from D75479 that I need for index-based looku

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 2 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:436 +if (ScoredResults.size() >= 3) { + // Assume we don't have results from the current file, otherwise the + // findNearbyIdentifier() mechanism w

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:436 +if (ScoredResults.size() >= 3) { + // Assume we don't have results from the current file, otherwise the + // findNearbyIdentifier() mechanism w

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 250031. nridge added a comment. Tweak a comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72874/new/ https://reviews.llvm.org/D72874 Files: clang-tools-extra/clangd/FindSymbols.cpp clang-tools-extra/cla

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. I should mention that in my local usage, I've found the restriction on no more than 3 results (even if they're not in the current file) to be somewhat limiting. For example, a comment can easily reference the name of a function which has more than 3 overloads. But we ca

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. (Also just to clarify: while I said on Discord that I already implemented exclusion of string literals, I actually ended up deferring that part to a follow-up because it wasn't working as I expected.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdc4cd43904df: [clangd] Add a textual fallback for go-to-definition (authored by sammccall, committed by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D76098: [WIP] [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D76098 Files: clang-tools-extr

[PATCH] D76098: [WIP] [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. This is my attempt to avoid triggering the textual fallback for string literals, as per the discussion in the issue . To classify tokens into the categories discussed in the issue, I resurrected and modified the `getTokenFlav

[PATCH] D76103: [clangd] Extend findTarget()'s dependent name heuristic to handle enumerators

2020-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D76103 Files: clang-tools-extra/clangd/FindTarget.cpp clang-tool

[PATCH] D76103: [clangd] Extend findTarget()'s dependent name heuristic to handle enumerators

2020-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 250863. nridge marked 2 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76103/new/ https://reviews.llvm.org/D76103 Files: clang-tools-ext

[PATCH] D76098: [WIP] [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:380 + TokenFlavor Flavor = getTokenFlavor(Loc, SM, AST.getLangOpts()); + // Only consider comment and (raw) identifier tokens. sammccall wrot

[PATCH] D76098: [WIP] [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:380 + TokenFlavor Flavor = getTokenFlavor(Loc, SM, AST.getLangOpts()); + // Only consider comment and (raw) identifier tokens. nridge wrote:

[PATCH] D76098: [WIP] [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 250885. nridge added a comment. Use TokenBuffer instead of a raw lexer. Note that getting this to word required enabling comment-retention mode for the lexer which produces the TokenBuffer. I'm not sure if this is desirable in general. Repository: rG LLVM

[PATCH] D74054: [clangd] Include the underlying decls in go-to-definition.

2020-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:695 + namespace ns { class [[Foo]] {}; } + using ns::[[F^oo]]; +)cpp", Why is it useful to give the using-declaration itself as a result? It seems like the

[PATCH] D76103: [clangd] Extend findTarget()'s dependent name heuristic to handle enumerators

2020-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 250922. nridge marked an inline comment as done. nridge added a comment. Address final review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76103/new/ https://reviews.llvm.org/D76103 Files: clang-tool

[PATCH] D76103: [clangd] Extend findTarget()'s dependent name heuristic to handle enumerators

2020-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG31b7f0ed6a93: [clangd] Extend findTarget()'s dependent name heuristic to handle enumerators (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D76098: [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 251418. nridge added a comment. Take a blacklisting approach Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76098/new/ https://reviews.llvm.org/D76098 Files: clang-tools-extra/clangd/XRefs.cpp clang-tools-ex

[PATCH] D76451: [clangd] Enable textual fallback for go-to-definition on dependent names

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. nridge marked an inline comment as done. nridge added inline comments. Comment

[PATCH] D76451: [clangd] Enable textual fallback for go-to-definition on dependent names

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:234 ParsedAST &AST, llvm::StringRef MainFilePath, - const SymbolIndex *Index) { + const SymbolIndex *Index, b

[PATCH] D76098: [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:381 + // to activate, are not retained by TokenBuffer). + for (syntax::Token T : syntax::spelledTokensTouching(Loc, AST.getTokens())) { +if (T.range(AST.get

[PATCH] D76098: [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 251476. nridge added a comment. Use WordStart Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76098/new/ https://reviews.llvm.org/D76098 Files: clang-tools-extra/clangd/XRefs.cpp clang-tools-extra/clangd/unit

<    6   7   8   9   10   11   12   13   14   >