[PATCH] D141800: [clangd] Fix qualifier not being dropped for using declaration referring to scoped enum

2023-09-19 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. (friendly ping) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141800/new/ https://reviews.llvm.org/D141800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D147847: [clangd] Hover: Add CalleeArgInfo for constructor expressions

2023-04-29 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcb133a4629a5: [clangd] Hover: Add CalleeArgInfo for constructor expressions (authored by tom-anders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147847/ne

[PATCH] D143112: [clang] Support parsing comments without ASTContext

2023-04-28 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. (ping) Does this make sense or are more adjustments needed? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143112/new/ https://reviews.llvm.org/D143112 ___ cfe-commits mailing

[PATCH] D147847: [clangd] Hover: Add CalleeArgInfo for constructor expressions

2023-04-28 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:986 + const FunctionDecl *FD = nullptr; + llvm::SmallVector Args; + nridge wrote: > tom-anders wrote: > > Unfortunately, while CallExpr and CXXConstructExpr basically have the same

[PATCH] D147847: [clangd] Hover: Add CalleeArgInfo for constructor expressions

2023-04-28 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 517994. tom-anders marked an inline comment as done. tom-anders added a comment. Use ArrayRef instead of SmallVector to avoid copy (also fix 2 typos in the comment below) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D147846: [clangd] Hover: resolve forwarding parameters for CalleeArgInfo

2023-04-28 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa7b4fd953f44: [clangd] Hover: resolve forwarding parameters for CalleeArgInfo (authored by tom-anders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147846/

[PATCH] D147847: [clangd] Hover: Add CalleeArgInfo for constructor expressions

2023-04-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. (Note that this diff is stacked on D147846 ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147847/new/ https://reviews.llvm.org/D147847 ___ c

[PATCH] D147847: [clangd] Hover: Add CalleeArgInfo for constructor expressions

2023-04-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:986 + const FunctionDecl *FD = nullptr; + llvm::SmallVector Args; + Unfortunately, while CallExpr and CXXConstructExpr basically have the same API for getting Args, they're not re

[PATCH] D147847: [clangd] Hover: Add CalleeArgInfo for constructor expressions

2023-04-08 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] D147846: [clangd] Hover: resolve forwarding parameters for CalleeArgInfo

2023-04-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added reviewers: nridge, upsj. 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-ext

[PATCH] D143112: [clang] Support parsing comments without ASTContext

2023-02-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders marked an inline comment as done. tom-anders added inline comments. Comment at: clang/lib/AST/RawCommentList.cpp:227 + SourceMgr.getLocForStartOfFile(SourceMgr.getMainFileID()), + Allocator, SourceMgr.getDiagnostics(), Traits)

[PATCH] D143112: [clang] Support parsing comments without ASTContext

2023-02-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 498586. tom-anders added a comment. Herald added a subscriber: arphaman. Herald added a project: clang-tools-extra. - Move to free function in CodeCompletionStrings.h - Add back comment markers before parsing (Index stores comments without markers, but the

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

2023-02-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 rGce87b0314370: [clangd] Fix getQueryScopes for using-directive with inline namespace (authored by tom-anders). Changed prior to commit: https://rev

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

2023-02-09 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. Thanks for reviewing! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140915/new/ https://reviews.llvm.org/D140915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-02-08 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D142014#4106088 , @v1nh1shungry wrote: > Thanks for the review! @kadircet > > Would you mind having a look at if there're any concerns about the current > code change, @nridge, @tom-anders, and @adamcz? Thanks a lot! Noth

[PATCH] D143112: [clang] Support parsing comments without ASTContext

2023-02-01 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang/include/clang/AST/RawCommentList.h:159 + /// Parse the \p Comment, storing the result in \p Allocator + static comments::FullComment *parse(llvm::StringRef Comment, + llvm::BumpPtrAllocator

[PATCH] D143112: [clang] Support parsing comments without ASTContext

2023-02-01 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added a reviewer: kadircet. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang. This is in preparation for implementing doxygen parsing, see disc

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

2023-02-01 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1709 + +// The enclosing namespace must be first, it gets a quality boost. +if (auto Enclosing = SpecifiedScopes.EnclosingNamespace) { kadircet wrote: > i was actually

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

2023-02-01 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 494074. tom-anders marked 4 inline comments as done. tom-anders added a comment. Move EnclosingNamespace logic to scopesForIndexQuery, add FIXME Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140915/new/ http

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

2023-01-29 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:1714 +} +llvm::copy_if(SpecifiedScopes.scopesForIndexQuery(), + std::back_inserter(QueryScopes), Should I

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

2023-01-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 493096. tom-anders marked 8 inline comments as done. tom-anders added a comment. Address review comments, add regression test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140915/new/ https://reviews.llvm.or

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:1035 } else if (const auto *MTE = CastNode->ASTNode.get()) { } else { // Unknown implicit node, assume type conversion. v1nh1shungry wrote: > tom-anders

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-23 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:1035 } else if (const auto *MTE = CastNode->ASTNode.get()) { } else { // Unknown implicit node, assume type conversion. This branch is now empty, do we

[PATCH] D141800: [clangd] Fix qualifier not being dropped for using declaration referring to scoped enum

2023-01-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1993 Builder.emplace(Recorder ? &Recorder->CCSema->getASTContext() : nullptr, -Item, SemaCCS, QueryScopes, *Inserter, FileName, +Recor

[PATCH] D141800: [clangd] Fix qualifier not being dropped for using declaration referring to scoped enum

2023-01-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1993 Builder.emplace(Recorder ? &Recorder->CCSema->getASTContext() : nullptr, -Item, SemaCCS, QueryScopes, *Inserter, FileName, +Recor

[PATCH] D141800: [clangd] Fix qualifier not being dropped for using declaration referring to scoped enum

2023-01-15 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 489391. tom-anders added a comment. Factor out logic into helper function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141800/new/ https://reviews.llvm.org/D141800 Files: clang-tools-extra/clangd/CodeCom

[PATCH] D141800: [clangd] Fix qualifier not being dropped for using declaration referring to scoped enum

2023-01-15 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] D140775: [clangd] Hover: show CalleeArgInfo for literals

2023-01-14 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG343b1ae3622a: [clangd] Hover: show CalleeArgInfo for literals and expressions (authored by tom-anders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140775/

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

2023-01-14 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-14 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 489284. tom-anders added a comment. Address review comment: Introduce new AccessibleScopes variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140915/new/ https://reviews.llvm.org/D140915 Files: clang-

[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] 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-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] 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] 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] 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] 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] 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] 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-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-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] 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] 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
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 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] 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] D134130: [clangd] Add doxygen parsing for Hover [1/3]

2022-12-13 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. Thanks for the detailed feedback! Unfortunately, I’m sick right now, so I probably won’t be able to give a detailed answer until after Christmas. In D134130#3992116 , @kadircet wrote: > Happy to move the discussion to some ot

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

2022-11-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp:93 +// Return true if `LHS` is declared in `RHS` +bool declareIn(const NamedDecl *LHS, const DeclContext *RHS) { + const auto *D = LHS->getDeclContext(); -

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

2022-11-29 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D138028#3957139 , @v1nh1shungry wrote: > A gentle ping? Sorry if it bothers you. Sorry! I thought you’d probably first wanted to address the remaining comments in https://reviews.llvm.org/D137817 because they might also a

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

2022-11-23 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 477566. tom-anders added a comment. Add end-to-end test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137894/new/ https://reviews.llvm.org/D137894 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp cla

[PATCH] D138425: [clangd] Parameter hints for template specialization

2022-11-21 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D138425#3941206 , @sammccall wrote: > In D138425#3941183 , @v1nh1shungry > wrote: > >> Yes, there is a common situation where people use a meaningless template >> parameter name, b

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

2022-11-21 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D137894#3940600 , @sammccall wrote: > Since this is a protocol extension, you might want to add an end-to-end test: > variant of `clang-tools-extra/clangd/test/xrefs.test` > (`xrefs-container.test`? to avoid complicating a

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

2022-11-21 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 476918. tom-anders marked 7 inline comments as done. tom-anders added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137894/new/ https://reviews.llvm.org/D137894 Files: clang-to

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

2022-11-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:1939 int main() { - int $def[[foo]]; - [[^foo]] = 2; - int test1 = [[foo]]; + int $def(main)[[foo]]; + $(main)[[^foo]] = 2; --

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

2022-11-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 updated this revision to Diff 476438. tom-anders added a comment. tom-anders retitled this revision from "[clangd] Prototype for adding enclosing function in references results"

[PATCH] D137909: [Support] Allow complex names for annotation points and ranges via ${}

2022-11-18 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. Thanks again! Landed this with your suggestions incorporated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137909/new/ https://reviews.llvm.org/D137909 ___ cfe-commits mailin

[PATCH] D137909: [Support] Allow complex names for annotation points and ranges via ${}

2022-11-18 Thread Tom Praschan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. tom-anders marked 6 inline comments as done. Closed by commit rG3cf14a7bdce0: [Support] Add support for attaching payloads to points and ranges (authored by tom-anders). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D137909: [Support] Allow complex names for annotation points and ranges via ${}

2022-11-17 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D137909#3933730 , @sammccall wrote: > Thanks! sorry about continuing to drift this patch, but this looks like a > great improvement. No problem! I wasn't quite happy yet with the previous version of this patch either, rea

[PATCH] D137909: [Support] Allow complex names for annotation points and ranges via ${}

2022-11-17 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 476230. tom-anders marked 8 inline comments as done. tom-anders added a comment. Use std::pair for returning payloads along with points/ranges. Also, refactor internal logic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D137909: [Support] Allow complex names for annotation points and ranges via ${}

2022-11-16 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/unittests/Annotations.h:30 + struct Position : clangd::Position { +llvm::Optional Payload; tom-anders wrote: > I thought about just using `std::pair llvm::Optional> instead, but that is

[PATCH] D137909: [Support] Allow complex names for annotation points and ranges via ${}

2022-11-16 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 475939. tom-anders added a comment. Fix clangd::Annotations interface, now also has pointWithPayload etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137909/new/ https://reviews.llvm.org/D137909 Files:

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

2022-11-16 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 rG0e00611cbc2b: [clangd] Add heuristic for dropping snippet when completing member function… (authored by tom-anders). Repository: rG LLVM Github Mo

[PATCH] D137909: [Support] Allow complex names for annotation points and ranges via ${}

2022-11-16 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D137909#3930043 , @sammccall wrote: > What do you think about `$name(payload)^` for the general case, with > `$(payload)^`, `$name`, and `^` as abbreviated forms? I don't think the lack > of brackets on **names** hurts a l

[PATCH] D137909: [Support] Allow complex names for annotation points and ranges via ${}

2022-11-16 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 475922. tom-anders added a comment. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang-tools-extra. Keep name syntax, add optional payload instead Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

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

2022-11-15 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp:212 // Produce replacements to add the qualifiers. std::string Qualifier = printUsingNamespaceName(Ctx, *TargetDirective) + "::"; for (auto Loc : IdentsToQua

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-11-15 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. LGTM, but I'll give @kadircet a chance to review as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137817/new/ https://reviews.llvm.org/D137817 ___ cfe-commits mailing lis

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

2022-11-14 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D137040#3924115 , @nridge wrote: > Thanks! Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040 ___

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

2022-11-13 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 474990. tom-anders added a comment. Clean up test 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-tools-

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

2022-11-11 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 474818. tom-anders added a comment. Fix test 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-tools-extra

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-11-11 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. This looks really cool :) Comment at: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp:133 + std::string Directives; + for (auto &Using : UsingToAdd) +Directives += llvm::formatv("using namespace {0};\n", Using); -

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

2022-11-10 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D137650#3919089 , @kadircet wrote: > sure i am happy to land, @tom-anders do you have anything else to add ? LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137650/new/

[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 added a comment. Hmm I added the test for the flag to Sema, but now we kinda have the same test case duplicated in sema and clangd tests - I guess for clangd we now actually only have to test that the SnippetSuffix is cleared when FunctionCanBeCall is true, but I don't see an easy wa

[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

[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] 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-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] 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] 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-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] 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] 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-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] 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] 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
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 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] 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] 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-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-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] 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 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-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] 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] 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] 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-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] 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] 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] 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

  1   2   >