[PATCH] D132797: [clangd] Support renaming virtual methods

2022-08-27 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fixes https://github.com/clangd/clang

[PATCH] D132797: [clangd] Support renaming virtual methods

2022-09-06 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 458221. tom-anders added a comment. Add test case that triggers assertion, limit recursion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132797/new/ https://reviews.llvm.org/D132797 Files: clang-tools-ext

[PATCH] D132797: [clangd] Support renaming virtual methods

2022-09-06 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders marked 6 inline comments as done. tom-anders added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:245 trace::Span Tracer("FindOccurrencesWithinFile"); assert(canonicalRenameDecl(&ND) == &ND && "ND should be already canonicaliz

[PATCH] D132797: [clangd] Support renaming virtual methods

2022-09-06 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 458270. tom-anders marked an inline comment as done. tom-anders added a comment. Fix recursivelyInsertRenames() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132797/new/ https://reviews.llvm.org/D132797 Fil

[PATCH] D132797: [clangd] Support renaming virtual methods

2022-09-06 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:554 + Req.Subjects = {Base}; + Index.relations(Req, [&](const SymbolID &, const Symbol &Override) { +IDs.insert(Override.ID); tom-anders wrote: > ilya-biryukov wrote:

[PATCH] D132797: [clangd] Support renaming virtual methods

2022-09-07 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D132797#3774138 , @sammccall wrote: > LG > > IIRC Tom doesn't have commit access, so I'll apply the last trivial changes > and commit to avoid another round trip. > (Please LMK if i'm wrong about this!) I actually have com

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-11 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This fixes https://github.com/clangd/

[PATCH] D133756: [clangd] Introduce CompileCommandsAdjuster

2022-09-13 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/indexer/IndexerMain.cpp:150-151 clang::tooling::ArgumentsAdjuster( - clang::clangd::CommandMangler::detect())); + [Mangler = std::shared_ptr( + clang::clangd::CommandMang

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-13 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 459864. tom-anders added a comment. Move logic to pickDeclToUse Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133664/new/ https://reviews.llvm.org/D133664 Files: clang-tools-extra/clangd/Hover.cpp clang

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-14 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 460058. tom-anders marked 5 inline comments as done. tom-anders added a comment. Add additional test, tidy up logic in pickDeclToUse() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133664/new/ https://review

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-14 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:1011 +const NamedDecl * +pickDeclToUse(const llvm::SmallVector &Candidates) { + if (Candidates.empty()) kadircet wrote: > you can just pass in ArrayRef instead. Ah of course, forgot

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-14 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. Yeah I do have commit access now, so I'll land this by myself. I don't think I have the permissions to close the corresponding issue on Github though, so someone else would need to do that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-15 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG220d85082349: [clangd] Fix hover on symbol introduced by using declaration (authored by tom-anders). Changed prior to commit: https://reviews.llvm.org/D133664?vs=460058&id=460328#toc Repository: rG L

[PATCH] D133664: [clangd] Fix hover on symbol introduced by using declaration

2022-09-15 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. Hmm, Github noticed that I referenced the issue with this commit, but didn't close it. According to https://github.blog/2013-03-18-closing-issues-across-repositories/ closing issues across repos should work, but only if you have push permissions in the repo that has

[PATCH] D128202: [clangd] Include "final" when printing class declaration

2022-06-28 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 440676. tom-anders added a comment. Check for FinalAttr instead of using isEffectivelyFinal() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128202/new/ https://reviews.llvm.org/D128202 Files: clang-tools-

[PATCH] D128826: Go-to-type on smart_ptr now also shows Foo

2022-06-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang-tools-extra. Fixes clangd/clangd#1026 Reposito

[PATCH] D128826: Go-to-type on smart_ptr now also shows Foo

2022-06-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/HeuristicResolver.h:75 + // could look up the name appearing on the RHS. + const Type *getPointeeType(const Type *T) const; + Not sure if it's the right call to make this public? The documen

[PATCH] D128826: Go-to-type on smart_ptr now also shows Foo

2022-06-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D128826#3619167 , @sammccall wrote: > Thanks! I just have a question if this behavior should be even "stronger": > > In most editors, if you return one result you go straight there, if you > return two results you get a men

[PATCH] D128826: Go-to-type on smart_ptr now also shows Foo

2022-06-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. > In D128826#3619339 , @tom-anders > wrote: > >> I'm using this with neovim's builtin LSP, where when there are multiple >> results it takes me to the first one, and also opens the quickfix window >> that shows all results. B

[PATCH] D128826: Go-to-type on smart_ptr now also shows Foo

2022-06-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/HeuristicResolver.h:75 + // could look up the name appearing on the RHS. + const Type *getPointeeType(const Type *T) const; + sammccall wrote: > tom-anders wrote: > > Not sure if it's the ri

[PATCH] D128826: Go-to-type on smart_ptr now also shows Foo

2022-06-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1913 // to target. -static QualType unwrapFindType(QualType T) { +static llvm::SmallVector unwrapFindType( +QualType T, const HeuristicResolver* H) { tom-anders wrote: > sammcca

[PATCH] D128826: Go-to-type on smart_ptr now also shows Foo

2022-06-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders marked 6 inline comments as done. tom-anders added a comment. > In D128826#3619956 , @tom-anders > wrote: > So here's what I thought: Say you have a variable that's a smart pointer and trigger textDocument/typeDefinition on it and th

[PATCH] D128826: Go-to-type on smart_ptr now also shows Foo

2022-06-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 441147. tom-anders marked an inline comment as done. tom-anders added a comment. - Remove obsolete comment - Return empty vector when type isNull() - Add comment about why we don't deduplicate results - Use out-parameter in unwrapFindType to make structure

[PATCH] D128826: Go-to-type on smart_ptr now also shows Foo

2022-07-10 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. @sammccall I think you can merge this for me now (and also https://reviews.llvm.org/D128202) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128826/new/ https://reviews.llvm.org/D128826 __

[PATCH] D129971: [clangd][WIP] Add doxygen parsing for Hover

2022-07-17 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: usaxena95, kadircet, arphaman, mgorny. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, llvm-commits, MaskRay, ilya-biryukov. Herald added projects: LLVM, clang-tools-extra.

[PATCH] D129971: [clangd][WIP] Add doxygen parsing for Hover

2022-07-17 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders abandoned this revision. tom-anders added a comment. Sorry, meant to make this a draft Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129971/new/ https://reviews.llvm.org/D129971 ___ cfe-commit

[PATCH] D108320: Add semantic token modifier for non-const reference parameter

2021-08-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang-tools-extra. See https://github.com/clangd/clangd/issues/839 Repository:

[PATCH] D108320: Add semantic token modifier for non-const reference parameter

2021-08-19 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders planned changes to this revision. tom-anders added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:547 +if (isa(Arg)) { + Location = Arg->getBeginLoc(); +} else if (auto *M = dyn_cast(Arg)) { -

[PATCH] D108320: Add semantic token modifier for non-const reference parameter

2021-08-19 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:538 +for (size_t I = 0; I < FD->getNumParams(); ++I) { + if (const auto *Param = FD->getParamDecl(I)) { +auto T = Param->getType(); sammccall wrote: >

[PATCH] D134137: [clangd] Return earlier when snippet is empty

2022-10-23 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D134137#3877726 , @sammccall wrote: > It's not surprising that we often don't crash here, the "obvious" lowering of > `S.front()` is `*S.data()` which is perfectly valid (will be 0 for an empty > string). > > One way to cr

[PATCH] D135536: [clangd] Hover: Only drop UsingDecl instead of BaseUsingDecl

2022-10-26 Thread Tom Praschan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd2135df4b5fb: [clangd] Hover: Only drop UsingDecl instead of BaseUsingDecl (authored by tom-anders). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D136925: [clangd] Index scoped enums for code completion

2022-10-28 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added a reviewer: nridge. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra.

[PATCH] D136925: [clangd] Index scoped enums for code completion

2022-10-30 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:2133 if (const auto *EnumDecl = dyn_cast(ND.getDeclContext())) -return InTopLevelScope(*EnumDecl) && !EnumDecl->isScoped(); nridge wrote: > Just to make sure I unders

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-10-30 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This implements the 1st heuristic men

[PATCH] D136925: [clangd] Index scoped enums for code completion

2022-10-31 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 472101. tom-anders marked 3 inline comments as done. tom-anders added a comment. Herald added a subscriber: wenlei. Add test to CodeCompletionTests, only consider unscoped enums in this patch (move scoped enums to separate patch) Repository: rG LLVM Gi

[PATCH] D137104: [clangd] Add scoped enum constants to all-scopes-completion

2022-10-31 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added a reviewer: nridge. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra.

[PATCH] D137104: [clangd] Add scoped enum constants to all-scopes-completion

2022-10-31 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 472103. tom-anders added a comment. Added missing hunk in CodeComplete.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137104/new/ https://reviews.llvm.org/D137104 Files: clang-tools-extra/clangd/CodeCo

[PATCH] D131853: [clangd] Add doxygen parsing for Hover

2022-08-14 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: wenlei, usaxena95, kadircet, arphaman, mgorny. Herald added a project: All. tom-anders published this revision for review. Herald added subscribers: cfe-commits, llvm-commits, MaskRay, ilya-biryukov. Herald added projects: LLVM, clang-tool

[PATCH] D131853: [clangd] Add doxygen parsing for Hover

2022-08-22 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added reviewers: sammccall, nridge. tom-anders added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131853/new/ https://reviews.llvm.org/D131853 ___ cfe-commits mailing list cfe

[PATCH] D131853: [clangd] Add doxygen parsing for Hover

2022-09-16 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D131853#3793831 , @nridge wrote: > In D131853#3792985 , @logankaser > wrote: > >> Is there anything I can do as a random member of the public that wants this >> and knows C++? > >

[PATCH] D134130: [clangd] Add doxygen parsing for Hover [1/3]

2022-09-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders added reviewers: nridge, sammccall, kadircet. tom-anders published this revision for review. Herald added subscribers: cfe-commits, llvm-commits, MaskRay, ilya-biryukov. Herald ad

[PATCH] D134131: [clangd] Use doxygen parsing for Hover [2/3]

2022-09-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders added reviewers: nridge, sammccall, kadircet. tom-anders published this revision for review. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project:

[PATCH] D134132: [clangd] Add doxygen parsing for Hover [3/3]

2022-09-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: wenlei, kadircet, arphaman. Herald added a project: All. tom-anders added reviewers: nridge, sammccall, kadircet. tom-anders published this revision for review. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a

[PATCH] D131853: [clangd] Add doxygen parsing for Hover

2022-09-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders abandoned this revision. tom-anders added a comment. Split up into 3 smaller patches: https://reviews.llvm.org/D134130, https://reviews.llvm.org/D134131 and https://reviews.llvm.org/D134132 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D134137: [clangd] Return earlier when snippet is empty

2022-09-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fixes github.com/clangd/clangd/issues

[PATCH] D134137: [clangd] Return earlier when snippet is empty

2022-09-19 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders marked an inline comment as done. tom-anders added inline comments. Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:1017 +TEST(CompletionTests, EmptySnippetDoesNotCrash) { +// See https://github.com/clangd/clangd/issues/1216

[PATCH] D134137: [clangd] Return earlier when snippet is empty

2022-09-19 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders marked an inline comment as done. tom-anders added inline comments. Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:1017 +TEST(CompletionTests, EmptySnippetDoesNotCrash) { +// See https://github.com/clangd/clangd/issues/1216

[PATCH] D134137: [clangd] Return earlier when snippet is empty

2022-09-20 Thread Tom Praschan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG60528c690a4c: [clangd] Return earlier when snippet is empty (authored by tom-anders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D134137: [clangd] Return earlier when snippet is empty

2022-09-20 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:1017 +TEST(CompletionTests, EmptySnippetDoesNotCrash) { +// See https://github.com/clangd/clangd/issues/1216 nridge wrote: > tom-anders wrote: > > tom-and

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-07 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fixes h

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-07 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:169 +// For renaming, we're only interested in foo's declaration, so drop the other one +void filterBaseUsingDecl(llvm::DenseSet& Decls) { + if (Decls.size() == 2) { I'm

[PATCH] D135506: [clangd] FindTarget: UsingEnumDecl is not an alias

2022-10-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders accepted this revision. tom-anders added a comment. This revision is now accepted and ready to land. lgtm, thanks! With this change in place, we could probably ajdust `pickDeclToUse` in Hover.cpp (introduced in https://reviews.llvm.org/D133664) to also check for `UsingDecl` instead of

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders marked 4 inline comments as done. tom-anders added a comment. In D135489#3844426 , @sammccall wrote: > namespace ns { int foo(int); char foo(char); } > using ns::foo; > int x = foo(42); > char y = foo('x'); > > What should happen when w

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 466292. tom-anders added a comment. Add additional tests, only handle UsingDecl instead of BaseUsingDecl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135489/new/ https://reviews.llvm.org/D135489 Files: c

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-09 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders marked 2 inline comments as done. tom-anders added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:170 +void filterUsingDecl(llvm::DenseSet& Decls) { + // There should never be more than one UsingDecl here, + // otherwise the rename would b

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-09 Thread Tom Praschan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGac21938fbdfa: [clangd] Fix rename for symbol introduced by UsingDecl (authored by tom-anders). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D135536: [clangd] Hover: Only drop UsingDecl instead of BaseUsingDecl

2022-10-09 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra

[PATCH] D135542: [clangd] Rename: Allow multiple canonical declarations [1/3]

2022-10-09 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders updated this revision to Diff 466391. tom-anders added a comment. tom-anders published this revision for review. Herald added subscribers:

[PATCH] D135543: [clangd] Rename: Allow renaming virtual methods overriding multiple base methods [2/3]

2022-10-09 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders updated this revision to Diff 466392. tom-anders added a comment. tom-anders updated this revision to Diff 466394. tom-anders published thi

[PATCH] D135544: [clangd] Rename: Allow renaming using declaration introducing multiple symbols [3/3]

2022-10-09 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders updated this revision to Diff 466393. tom-anders added a comment. tom-anders edited the summary of this revision. tom-anders published this

[PATCH] D133843: [clangd] Prefer definitions for gototype and implementation

2022-10-11 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. > happy to add some comments for the reasoning if you (and possibly others > seeing this change) also agree that this is more useful Can confirm that (at least to me) it's really annoying when it takes me to a forward declaration here. I 99% of the time will immediat

[PATCH] D135892: [clangd] Add missing readonly modifier for const generic parameters

2022-10-13 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added reviewers: nridge, sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tool

[PATCH] D135892: [clangd] Add missing readonly modifier for const generic parameters

2022-10-13 Thread Tom Praschan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa8124eea9df5: [clangd] Add missing readonly modifier for const generic parameters (authored by tom-anders). Repository: rG LLVM Github Monorepo C

[PATCH] D135892: [clangd] Add missing readonly modifier for const generic parameters

2022-10-13 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135892/new/ https://reviews.llvm.org/D135892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D137894: [clangd] Add extension for adding context (enclosing function or class) in references results

2022-12-28 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1484 +LookupRequest ContainerLookup; +llvm::DenseMap RefIndexForContainer; Results.HasMore |= Index->refs(Req, [&](const Ref &R) { nridge wrote: > We can have multiple r

[PATCH] D137894: [clangd] Add extension for adding context (enclosing function or class) in references results

2022-12-28 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 485482. tom-anders marked 8 inline comments as done. tom-anders added a comment. Rebase, fix review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137894/new/ https://reviews.llvm.org/D137894 Files:

[PATCH] D138028: [clangd] Fix action `RemoveUsingNamespace` for inline namespace

2022-12-28 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders accepted this revision. tom-anders added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138028/new/ https://reviews.llvm.org/D138028 __

[PATCH] D137894: [clangd] Add extension for adding context (enclosing function or class) in references results

2022-12-28 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 485483. tom-anders added a comment. s/llvm::Optional/std::optional/ for containerName field Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137894/new/ https://reviews.llvm.org/D137894 Files: clang-tools-ex

[PATCH] D138028: [clangd] Fix action `RemoveUsingNamespace` for inline namespace

2022-12-28 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG46575f60380b: [clangd] Fix action `RemoveUsingNamespace` for inline namespace (authored by v1nh1shungry, committed by tom-anders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2022-12-30 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added reviewers: nridge, sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tool

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2022-12-30 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:808 +void maybeAddCalleeArgInfo(const SelectionTree::Node *N, HoverInfo &HI, + const PrintingPolicy &PP); (I also modified this function, so I added this

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2022-12-31 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 485761. tom-anders marked 4 inline comments as done. tom-anders added a comment. Refactor getHoverContents to add CalleeArgInfo for all kinds of expression Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140775

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2022-12-31 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:779 -HoverInfo getStringLiteralContents(const StringLiteral *SL, - const PrintingPolicy &PP) { - HoverInfo HI; - +void addStringLiteralContents(const StringLitera

[PATCH] D137894: [clangd] Add extension for adding context (enclosing function or class) in references results

2022-12-31 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. Thanks both of you for reviewing! I added documentation to the website here: https://github.com/llvm/clangd-www/pull/77 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137894/new/ https://reviews.llvm.org/D137894 __

[PATCH] D137894: [clangd] Add extension for adding context (enclosing function or class) in references results

2023-01-01 Thread Tom Praschan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd408c34d1f58: [clangd] Add extension for adding context (enclosing function or class) in… (authored by tom-anders). Repository: rG LLVM Github Mon

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2023-01-02 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D140775#4021634 , @nridge wrote: > Do you want to add a simple test case for a non-literal expression? Something > like hovering over the `+` in `2 + 3` should work. Will do! > Also, this is pre-existing, but I noticed th

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2023-01-03 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 486039. tom-anders added a comment. Add test for expression, improve presentation for signature with unnamed parameter Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140775/new/ https://reviews.llvm.org/D140

[PATCH] D140915: [clangd] Fix getQueryScopes for using-directive with inline namespace

2023-01-03 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added reviewers: nridge, kadircet. Herald added a subscriber: arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra.

[PATCH] D140915: [clangd] Fix getQueryScopes for using-directive with inline namespace

2023-01-04 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:674 +else if (const auto *ND = dyn_cast(Context)) { + if (ND->isInlineNamespace()) +Scopes.AccessibleScopes.push_back(printQualifiedName(*ND) + "::"); kadirce

[PATCH] D140915: [clangd] Fix getQueryScopes for using-directive with inline namespace

2023-01-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:674 +else if (const auto *ND = dyn_cast(Context)) { + if (ND->isInlineNamespace()) +Scopes.AccessibleScopes.push_back(printQualifiedName(*ND) + "::"); kadirce

[PATCH] D136925: [clangd] Index unscoped enums inside classes for code completion

2022-11-01 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 472425. tom-anders marked 4 inline comments as done. tom-anders added a comment. Add additional test, don't bump index version Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136925/new/ https://reviews.llvm.o

[PATCH] D137104: [clangd] Add scoped enum constants to all-scopes-completion

2022-11-01 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 472426. tom-anders added a comment. Rebase onto previous commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137104/new/ https://reviews.llvm.org/D137104 Files: clang-tools-extra/clangd/CodeComplete.cpp

[PATCH] D136925: [clangd] Index unscoped enums inside classes for code completion

2022-11-01 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:2966 {cls("nx::Clangd1"), cls("ny::Clangd2"), cls("Clangd3"), - cls("na::nb::Clangd4")}, + cls("na::nb::Clangd4"), enmConstant("na::C::Clangd5")}, Opts

[PATCH] D136925: [clangd] Index unscoped enums inside classes for code completion

2022-11-01 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 472428. tom-anders added a comment. Fix accidental line break in comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136925/new/ https://reviews.llvm.org/D136925 Files: clang-tools-extra/clangd/CodeComp

[PATCH] D136925: [clangd] Index unscoped enums inside classes for code completion

2022-11-02 Thread Tom Praschan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa68bcd81dcc9: [clangd] Index unscoped enums in class scope for code completion (authored by tom-anders). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D136925: [clangd] Index unscoped enums inside classes for code completion

2022-11-02 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D136925#3901509 , @nridge wrote: > Thanks! > > I don't think we need this much detail in the commit message; I think after > the first line it would be sufficient to say: > > Fixes https://github.com/clangd/clangd/issues/

[PATCH] D137104: [clangd] Add scoped enum constants to all-scopes-completion

2022-11-02 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 472568. tom-anders added a comment. Update `CompletionTest.Enums`, keep scope condition in isIndexedForCodeCompletion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137104/new/ https://reviews.llvm.org/D1371

[PATCH] D137104: [clangd] Add scoped enum constants to all-scopes-completion

2022-11-02 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders marked an inline comment as done. tom-anders added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:2136 + if (llvm::isa(ND.getDeclContext())) +return true; nridge wrote: > Why remove the `(InTopLevelScope(*EnumDecl) || InC

[PATCH] D137104: [clangd] Add scoped enum constants to all-scopes-completion

2022-11-02 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 472578. tom-anders marked an inline comment as done. tom-anders added a comment. Actually fix test... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137104/new/ https://reviews.llvm.org/D137104 Files: clan

[PATCH] D137104: [clangd] Add scoped enum constants to all-scopes-completion

2022-11-02 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG990c18937967: [clangd] Add scoped enum constants to all-scopes-completion (authored by tom-anders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137104/new/

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-04 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D137040#3907497 , @nridge wrote: > Thanks for the patch! > > The test looks good to me. > > As for the fix, I wonder if it would make sense to implement it in the Sema > layer rather than in clangd. For example, we could gi

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-05 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 473408. tom-anders added a comment. Herald added a project: clang. Move logic to SemaCodeComplete.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040 Files: clan

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-05 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. The test in clangd/unittests/CodeCompleteTests.cpp still passes. We now probably also need a unit test for Sema that tests the new flag, right? Comment at: clang-tools-extra/clangd/CodeComplete.cpp:414 &Completion.RequiredQualifi

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders requested changes to this revision. tom-anders added a comment. This revision now requires changes to proceed. Did a quick test on my machine, seems to work! Can you add a regression test to clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp though? Repository:

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-06 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders accepted this revision. tom-anders added a comment. This revision is now accepted and ready to land. Thanks for the fix, LGTM! Do you want me to commit this for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137494/new/ https://revie

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-06 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf5a2ef80fa47: [clangd] Fix the code action `RemoveUsingNamespace` (authored by v1nh1shungry, committed by tom-anders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D137550: [clangd] Fix the code action `RemoveUsingNamespace`

2022-11-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders accepted this revision. tom-anders added a comment. This revision is now accepted and ready to land. Would be cool if in the future we could instead transform something like using namespace std; int main() { auto t = 5ms; } into using namespace std::chrono_literals; in

[PATCH] D137650: [clangd] Implement hover for C++ string literals

2022-11-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:785 + + // TODO: Show string literal's contents + HI.Name = "String Literal"; Is it really useful to show the contents inside the Hover? You already see the contents of the string

[PATCH] D137550: [clangd] Fix the code action `RemoveUsingNamespace`

2022-11-09 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82ca918b5755: [clangd] Fix the code action `RemoveUsingNamespace` (authored by v1nh1shungry, committed by tom-anders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-09 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 474358. tom-anders added a comment. Add test to sema Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040 Files: clang-tools-extra/clangd/CodeComplete.cpp clang-too

  1   2   >