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
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
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
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
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
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
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
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
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:
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
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
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
12 matches
Mail list logo