[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5c46fefdba3b: [clangd] Improve hover on arguments to function call (authored by adamcz, committed by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-07-02 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 275104. adamcz marked an inline comment as done. adamcz added a comment. removed some more {} Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81169/new/ https://reviews.llvm.org/D81169 Files: clang-tools-extra/

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-07-02 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 275073. adamcz added a comment. Final review comment + rebase on top of HEAD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81169/new/ https://reviews.llvm.org/D81169 Files: clang-tools-extra/clangd/Hover.cpp

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet marked an inline comment as done. kadircet added a comment. This revision is now accepted and ready to land. Thanks, LGTM! Comment at: clang-tools-extra/clangd/Hover.cpp:929 +if (CallPassType->PassBy != HoverInfo::PassType::Value) {

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-06-29 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 274147. adamcz marked 8 inline comments as done. adamcz added a comment. Addressed review comments, also added some "const" here and there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81169/new/ https://review

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-06-29 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:721 +// Extract matching argument from function declaration. +if (const ParmVarDecl *PVD = FD->getParamDecl(I)) { + HI.CalleeArgInfo.emplace(toHoverInfoParam(PVD, Policy));

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks a lot! haven't checked the tests yet. Comment at: clang-tools-extra/clangd/Hover.cpp:716 + for (unsigned I = 0; I < CE->getNumArgs() && I < FD->getNumParams(); ++I) { +auto *Arg = CE->getArg(I); +if (Arg != OuterNode.ASTNode.get())

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-06-26 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 273742. adamcz marked 2 inline comments as done. adamcz added a comment. Formatting changed to spell out [const] reference and hide type unless conversion happens. Defining what the "correct" behavior is on various cases is very difficult. This is my best shot

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-06-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:695 + const PrintingPolicy &Policy) { + if (!N) +return; nit: this is already checked before entering the func

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-06-05 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:525 + if (const auto *Var = dyn_cast(D)) { +// Check if we are inside CallExpr kadircet wrote: > umm, is this a fixme or a leftover? I suppose it is from a previous version > of

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-06-05 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 268780. adamcz marked 11 inline comments as done. adamcz added a comment. addressed review comments, some UI questions remain open for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81169/new/ https://review

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-06-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added a comment. thanks! that looks really useful, especially knowing when a parameter is being passed as a ref/val. Comment at: clang-tools-extra/clangd/Hover.cpp:292 +void fillParam(const ParmVarDecl *PVD, HoverInfo::Para

[PATCH] D81169: [clangd] Improve hover on arguments to function call

2020-06-04 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. adamcz added a reviewer: kadircet. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. In cases like: foo(a, ^b); We now additionally show the name and type of the parameter to foo that corre