[PATCH] Supporting function-try-blocks for -Wreturn-type

Richard Smith richard at metafoo.co.uk
Thu Oct 23 16:57:09 PDT 2014


On Wed, Oct 22, 2014 at 5:32 PM, Aaron Ballman <aaron at aaronballman.com>
wrote:

> On Wed, Oct 22, 2014 at 8:13 PM, Richard Smith <richard at metafoo.co.uk>
> wrote:
> > On Wed, Oct 22, 2014 at 2:44 PM, Aaron Ballman <aaron at aaronballman.com>
> > wrote:
> >>
> >> On Wed, Oct 22, 2014 at 5:21 PM, David Blaikie <dblaikie at gmail.com>
> wrote:
> >> > My only quandry is: what other things can the body be? If CompoundStmt
> >> > and
> >> > and CXXTryStmt are the only ones, then we can remove the conditional
> >> > entirely.
> >>
> >> I think we can remove that conditional. IssueWarnings calls getBody()
> >> on the Decl passed in from PopFunctionScopeInfo, and that should
> >> always be something function-like, and I can't think of a situation
> >> where we'd get something other than a CompoundStmt or CXXTryStmt.
> >>
> >> Richard, can you think of any situations that would be problematic?
> >
> >
> > No, the body of a function is always one of those two things.
>
> Assuming I remove the isa<> tests, does the patch LGTY?


Yes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141023/d7e82f95/attachment.html>


More information about the cfe-commits mailing list