[PATCH] D83189: [clangd] More complete fix for hover crashes on invalid record.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 12:54:11 PDT 2020
hokein marked an inline comment as done.
hokein added inline comments.
================
Comment at: clang-tools-extra/clangd/Hover.cpp:677
HI.Size = Size->getQuantity();
- if (!FD->isInvalidDecl())
HI.Offset = Ctx.getFieldOffset(FD) / 8;
+ }
----------------
kadircet wrote:
> hokein wrote:
> > kadircet wrote:
> > > could you move this out of the if statement.
> > I'm not sure whether Size and Offset should be be independent, IIUC your fix seems to change it as a side effect, this just preserves the old behavior.
> it wasn't a side effect, it was intentional and stamped (and explicitly spelled out in the description)
ah, OK, changed it back.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83189/new/
https://reviews.llvm.org/D83189
More information about the cfe-commits
mailing list