hokein added inline comments.

================
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
----------------
kadircet wrote:
> 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)
Done, updated the comment. I'd rather leave out the FIXME (it is unclear that 
we will address it).

The InitListExpr is tricky, the AST nodes is preserved in the syntactic form 
for InitListExpr (go-to-definition actually works on the broken initializer 
`A()` ), but here we're using the *semantic*-form...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131696

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to