[PATCH] D111419: [Demangle] Add support for D types back referencing
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 28 11:20:06 PST 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/Demangle/DLangDemangle.cpp:312
+ if (Backref == nullptr)
+ return nullptr;
+
----------------
ljmf00 wrote:
> dblaikie wrote:
> > RKSimon wrote:
> > > @ljmf00 coverity is warning that it looks like we fail to restore LastBackref if we early-return here - is that correct?
> > Out of curiosity, do you have the full/actual Coverity error? Is it detecting based on the "Save" prefix that the variable is intended to save/restore?
> >
> > I'm guessing on this codepath we're probably on an error path anyway, and it doesn't matter if it's restored?
> >
> > But @ljmf00 could you confirm that that's the case and/or that this path (a LastBackref value, and a bail-out through this early return) is tested/behaving as desired?
> I don't see the need to restore such variable, as this will abort the demangler anyway. parse functions doesn't usually restore the demangler context, only decode functions, if needed. Can you clarify why this triggered your attention to this? I also requested access to coverity, is that possible?
I'm working my way back in time reviewing warnings - this was first detected at 2022/1/14
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111419/new/
https://reviews.llvm.org/D111419
More information about the llvm-commits
mailing list