[PATCH] D8822: Proposed fix for PR23076 (conditional branch debug line info)

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 15 18:08:20 PST 2016


dblaikie added a subscriber: dblaikie.
dblaikie added a comment.

Apologies for the massively delayed review. I think this is probably good,
but here are some test cases to discuss (& I've cc'd Paul Robinson and
Adrian Prantl, both who work on debug info in LLVM as well, to get their
thoughts)

Given this code:

  1. int main() {
  2. if (
  3. tr()
  4. &&
  5. tr()
  6. )
  7. func(); 8.
  8. if (
1. fa()
2. &&
3. tr()
4. )
5. func();
6. }

G++-4.8:
3, 4, 5, 4, 2, 7
10, 11, 9, 15

Clang before the change:
3, 4, 5, 3, 7
10, 11, 15

Clang after the change:
3, 5, 7
10, 15

The lack of stepping between the evaluation of the LHS and the RHS to the
&& expression seems like a loss, but not a great one. How's everyone else
feel about it? (I imagine we can, with some work, preserve that step while
avoiding the weird backwards step to the start of the expression before
continuing)


http://reviews.llvm.org/D8822





More information about the cfe-commits mailing list