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/
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/
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
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) {
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
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));
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())
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
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
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
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
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
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
13 matches
Mail list logo