[PATCH] D131696: [clangd] Fix an inlay-hint crash on a broken designator.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 12 05:23:46 PDT 2022
kadircet accepted this revision.
kadircet added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:144
});
- if (llvm::isa<ImplicitValueInitExpr>(Init))
+ if (!Init || llvm::isa<ImplicitValueInitExpr>(Init))
continue; // a "hole" for a subobject that was not explicitly initialized
----------------
nit: can you also update the comment to mention `broken initializer` (and maybe even a fixme to handle these, as in theory this is likely spelled in the code, but wasn't retained in the AST even as a `recoveryexpr`, hence we still have a place to attach the hint)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131696/new/
https://reviews.llvm.org/D131696
More information about the cfe-commits
mailing list