<br><br><div>On Fri Jan 03 2014 at 4:00:30 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Jan 3, 2014, at 15:53, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br>
<br>
> There's not enough information in the commit message, the comments, or the test cases to know what's broken or fixed here. Why is forcing the block the correct solution here? What is it working around?<br>
><br>
><br>
<br>
Let’s use this as an example:<br>
<br>
> ==============================<u></u>==============================<u></u>==================<br>
> --- cfe/trunk/test/CodeGenObjC/<u></u>arc-linetable.m (original)<br>
> +++ cfe/trunk/test/CodeGenObjC/<u></u>arc-linetable.m Fri Jan  3 17:34:30 2014<br>
<br>
- (int)testNoSideEffect:(<u></u>NSString *)foo {<br>
  int x = 1;<br>
  return 1; // Return expression<br>
}<br>
<br>
Before this fix, a user would set a breakpoint at the return expression and then attempt to print x and it would fail, because the instruction that is at that line would be in the DW_TAG_subprogram lexical scope (instead of the lexical scope of the function body compound statement which contains x).<br>
</blockquote><div><br></div><div>I'm confused by this - Clang doesn't emit a separate lexical scope for the top level compound statement of a function... </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Since the compound statement is ended before we emit the cleanups and return block those instructions end up in the wrong scope.<br>
<br>
-- adrian<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-commits</a><br>
</blockquote>