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

Aaron Ballman aaron at aaronballman.com
Fri Oct 24 06:30:10 PDT 2014


On Thu, Oct 23, 2014 at 7:57 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> 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.

Thanks! Committed in r220557.

~Aaron



More information about the cfe-commits mailing list