[PATCH] D82701: [clangd][Hover] Dont crash on null types

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 29 00:29:37 PDT 2020


kadircet marked 4 inline comments as done.
kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/Hover.cpp:302
       P.Type = printType(PVD->getType(), Policy);
     } else {
       std::string Param;
----------------
hokein wrote:
> nit: now we can remove this if-else branch.
well, I wasn't sure what we were logging for :/

but I think you are right, it seems hard to find in the best case.


================
Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:716
+          void foo() {
+            M(auto [^[[x]]], bar()); /*error-ok*/
+          }
----------------
hokein wrote:
> I think `auto [x, y] = 1` should be enough to reproduce the crash.
i could swear this was not crashing the first time i checked :P


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82701/new/

https://reviews.llvm.org/D82701





More information about the cfe-commits mailing list