[cfe-dev] Undiagnosed "reference to stack memory [...] returned"

Alexei Svitkine alexei.svitkine at gmail.com
Wed Sep 15 15:18:04 PDT 2010


Does the analyzer support C++ now?

-Alexei

On Wed, Sep 15, 2010 at 5:25 PM, Ted Kremenek <kremenek at apple.com> wrote:

>
> On Sep 15, 2010, at 1:13 PM, Eli Friedman wrote:
>
> > On Wed, Sep 15, 2010 at 12:58 PM, Matthieu Monrocq
> > <matthieu.monrocq at gmail.com> wrote:
> >> Therefore it seems that the proper thing to do would be to diagnose the
> >> issue (in both get_reference_no_warning cases) and let the developer fix
> >> them. I surmise it should be possible to detect them (since VC++ already
> >> detects the first case), but then, as I said, I am very naive about
> >> compilers yet.
> >>
> >> I hope to look at this further during the week-end, guess it would be as
> >> good a way as any to try and understand how Clang work
> >
> > Yes, we should be able to diagnose both cases... the relevant code is
> > Sema::CheckReturnStackAddr in SemaChecking.cpp.
> >
> > -Eli
>
> I'll fix this.  It will be good for me (after being confused about this
> one).
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100915/5c0ab49b/attachment.html>


More information about the cfe-dev mailing list