This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG06b97b4985ad: [clangd] Fix an inlay-hint crash on a broken
designator. (authored by hokein).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LA
hokein added inline comments.
Comment at: clang-tools-extra/clangd/InlayHints.cpp:144
});
-if (llvm::isa(Init))
+if (!Init || llvm::isa(Init))
continue; // a "hole" for a subobject that was not explicitly initialized
kadircet wrote:
> nit: can
hokein updated this revision to Diff 452155.
hokein added a comment.
update the comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131696/new/
https://reviews.llvm.org/D131696
Files:
clang-tools-extra/clangd/InlayHints.cpp
clang-tools-extr
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(Init))
+if (!Init || llvm::isa(Init))
continue; // a "hole" for a subob
hokein added inline comments.
Comment at: clang-tools-extra/clangd/InlayHints.cpp:140
for (const Expr *Init : Sem->inits()) {
+if (!Init)
+ continue;
kadircet wrote:
> we should have this bail out after introducing the scope_exit below to make
> sure
hokein updated this revision to Diff 452141.
hokein marked an inline comment as done.
hokein added a comment.
address review comment -- make sure we skip the corresponding field when its
init expr is null, and polish the testcase.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/InlayHints.cpp:140
for (const Expr *Init : Sem->inits()) {
+if (!Init)
+ continue;
we should have this bail out after introducing the scope_exit below to make
sure we skip the field
hokein created this revision.
hokein added a reviewer: kadircet.
Herald added subscribers: usaxena95, arphaman.
Herald added a project: All.
hokein requested review of this revision.
Herald added subscribers: MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
Repository:
rG LLVM