<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 10, 2017 at 6:20 PM, Caroline Tice via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>I'm forwarding this question about clang warnings for a friend:</div><div>...</div></div></blockquote><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>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?<br></div><div><br></div></div></blockquote><div><br></div><div>I'm not sure that it's correct but there exist similar test cases that would suggest it's the intended behavior. </div><div><br></div><div><a href="https://github.com/llvm-mirror/clang/blob/master/test/Analysis/dead-stores.c#L483">https://github.com/llvm-mirror/clang/blob/master/test/Analysis/dead-stores.c#L483</a><br></div><div><br></div><div>This review shows a motivating example for this warning  (which does not include nested loops): <a href="https://reviews.llvm.org/D2518">https://reviews.llvm.org/D2518</a></div><div><br></div><div><br></div></div>
</div></div>