[PATCH] D101743: [clangd] Fix hover crash on broken code
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 3 13:01:57 PDT 2021
hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:2447
+ // Setter variable heuristic might fail if the callexpr is broken.
+ struct X { int Y; void [[^setY]](float) { Y = foo(x); } };)cpp");
+
----------------
IIUC, x refers to an undefined variable right? might be renamed it to `undefine`.
Instead of creating a new test, maybe add this no-crash test to `TEST(Hover, NoHover) {`, looks like a good fit there.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101743/new/
https://reviews.llvm.org/D101743
More information about the cfe-commits
mailing list