[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-21 Thread WangWei via Phabricator via cfe-commits
lightmelodies added a comment. In D131295#3935759 , @Trass3r wrote: > Yeah quite complex: https://godbolt.org/z/8T5Pqadro Not very hard with a track of visited decls. It should also reslove other duplicate codelens. https://github.com/lightmelodies/llvm

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-17 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. Yeah quite complex: https://godbolt.org/z/8T5Pqadro Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131295/new/ https://reviews.llvm.org/D131295 ___ cfe-commits mailing list cfe-co

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-17 Thread WangWei via Phabricator via cfe-commits
lightmelodies added a comment. In D131295#3935027 , @Trass3r wrote: > Thanks, it seems to fix the base case, but I still see multiple lenses when I > add > > template > int Foo::foo() > { > return 0; > } Interesting, I see the same issue

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-17 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. Thanks, it seems to be that simple case, but I still see multiple lenses when I add template int Foo::foo() { return 0; } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131295/new/ https://reviews.llvm.org/D

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-17 Thread WangWei via Phabricator via cfe-commits
lightmelodies added a comment. In D131295#3933381 , @Trass3r wrote: > One remaining issue is multiple lenses for template code like > > template > int i = 0; > > template int i<0>; > template int i<1>; > template int i<2>; > > template

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-17 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. One remaining issue is multiple lenses for template code like template int i = 0; template int i<0>; template int i<1>; template int i<2>; template struct Foo { int foo(); // I see 3 codelenses here }; template struct Foo<0>; template

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-13 Thread Trass3r via Phabricator via cfe-commits
Trass3r added inline comments. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:348 +"code-lens", cat(Features), desc("Enable preview of CodeLens feature"), +init(true), Hidden, +}; I guess we should rather make it opt-in and gather some feedback

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-07 Thread Trass3r via Phabricator via cfe-commits
Trass3r added inline comments. Comment at: clang-tools-extra/clangd/CodeLens.cpp:93 + if (auto Loc = declToLocation(P->getCanonicalDecl())) +Super.locations.emplace_back(*Loc); +} As noted in the previous PR it may be of low value, I guess only i

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-07 Thread Trass3r via Phabricator via cfe-commits
Trass3r updated this revision to Diff 473662. Trass3r edited the summary of this revision. Trass3r added a comment. remove bases codelens for classes fix lit test exclude self from ref count Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131295/new/

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a reviewer: kadircet. nridge added a comment. Haven't had a chance to look at this yet. I do see that the earier implementation in D91930 was the subject of some design discussions about performance with @kadircet, adding him as an additional revie

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-08-05 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. I just searched again and found https://reviews.llvm.org/D91930. But seems like it never got updated with the latest code contained in here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131295/new/ https://reviews.llvm.org

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-08-05 Thread Trass3r via Phabricator via cfe-commits
Trass3r created this revision. Herald added subscribers: usaxena95, kadircet, arphaman, javed.absar, mgorny. Herald added a project: All. Trass3r edited the summary of this revision. Trass3r edited projects, added clang-tools-extra; removed All. Trass3r edited subscribers, added: sammccall; removed