]> granicus.if.org Git - clang/commit
DebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for loop...
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 15 Aug 2014 20:50:45 +0000 (20:50 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 15 Aug 2014 20:50:45 +0000 (20:50 +0000)
commitc733e272173d8a390f464c2110328d04bfd786ed
tree97248007acfdd62d5897d5d596a6d02a223bcc2a
parent3a9d3ba5555edccdc29b9e87fdb91ddb5f4a3367
DebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for loop, to the start of the loop.

This avoids debuggers stepping to strange places (like the last
statement in the loop body, or the first statement in the if).

This is not the whole answer, though - similar bugs no doubt exist in
other loops (patches to follow) and attributing exception handling code
to the correct line is also tricky (based on the previous fix to
PR19864, exception handling is still erroneously attributed to the 'if'
line).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215766 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGStmt.cpp
test/CodeGenCXX/debug-info-line-if.cpp