[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-16 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo added a comment. Thanks! Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:3726 +TEST(Hover, FunctionParameterDefaulValueNotEvaluatedOnInvalidDecls) { + struct { hokein wrote: > nit: instead of creating a completely-new TEST, it seems sim

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-16 Thread Viktoriia Bakalova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. VitaNuo marked an inline comment as done. Closed by commit rGc9888dce4474: [clangd] Skip function parameter decls when evaluating variables on hover. (authored by VitaNuo). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Thanks, looks good, just one nit to simplify the unittest. Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:3726 +TEST(Hover, FunctionParameterDefaulValueNotEv

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-16 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:663 + const auto *Var = dyn_cast(D); + if (Var && !llvm::isa(Var)) { if (const Expr *Init = Var->getInit()) VitaNuo wrote: > hokein wrote: > > We're ignoring all `ParmVarDecl` ca

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-16 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo added a comment. Thanks for the review! Comment at: clang-tools-extra/clangd/Hover.cpp:663 + const auto *Var = dyn_cast(D); + if (Var && !llvm::isa(Var)) { if (const Expr *Init = Var->getInit()) hokein wrote: > We're ignoring all `ParmVarDecl` ca

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-16 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 532044. VitaNuo marked 2 inline comments as done. VitaNuo added a comment. Simplify. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153015/new/ https://reviews.llvm.org/D153015 Files: clang-tools-extra/clangd

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-16 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 532042. VitaNuo added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153015/new/ https://reviews.llvm.org/D153015 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-ex

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:663 + const auto *Var = dyn_cast(D); + if (Var && !llvm::isa(Var)) { if (const Expr *Init = Var->getInit()) We're ignoring all `ParmVarDecl` cases, The crash here is for broken

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-15 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo added a comment. thanks! Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:3726 +TEST(Hover, FunctionParameterDefaulValueNotEvaluated) { + Annotations T("void foo(int p^aram = 5);"); + TestTU TU = TestTU::withCode(T.code()); hokein wrote:

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. thanks. Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:3726 +TEST(Hover, FunctionParameterDefaulValueNotEvaluated) { + Annotations T("void foo(int p^aram = 5);"); + TestTU TU = TestTU::withCode(T.code()); I believe this

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-15 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 531718. VitaNuo added a comment. Simplify. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153015/new/ https://reviews.llvm.org/D153015 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-extra/clangd/unit

[PATCH] D153015: [clangd] Skip function parameter decls when evaluating variables on hover.

2023-06-15 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. VitaNuo requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: rG LLVM Github Monorepo http