[cfe-dev] question about clang warning

Brian Cain via cfe-dev cfe-dev at lists.llvm.org
Mon Apr 10 17:53:17 PDT 2017


On Mon, Apr 10, 2017 at 6:20 PM, Caroline Tice via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

>
> I'm forwarding this question about clang warnings for a friend:
> ...
>



>
> In my understanding the break statement is clearly part of the switch
> construct and in this context there is a single loop, it is not clear why
> clang is referring to an enclosing loop.  Could someone verify that this is
> correct and explain why?
>
>
I'm not sure that it's correct but there exist similar test cases that
would suggest it's the intended behavior.

https://github.com/llvm-mirror/clang/blob/master/test/Analysis/dead-stores.c#L483

This review shows a motivating example for this warning  (which does not
include nested loops): https://reviews.llvm.org/D2518
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170410/d76d7510/attachment.html>


More information about the cfe-dev mailing list