inglorion added inline comments.

================
Comment at: clang/test/CodeGenCXX/debug-info-nested-exprs.cpp:44
+  int a = bar(x, y) +
+          baz(x, z) +
+          qux(y, z);
----------------
zturner wrote:
> inglorion wrote:
> > zturner wrote:
> > > Can you make a function called `int foo()` and make this `int a = 
> > > bar(foo(), y) + ...`
> > Yes. Why? To test an additional level of nesting?
> Yes.  for that matter, even better would be if this call to `foo()` spans 
> multiple lines.  Right here you've got a single statement which spans 
> multiple lines, but no individual sub-expression spans multiple lines.  And 
> FWICT there is no nesting at all, since + is just a builtin operator.
The nesting here is the calls to bar, baz, and qux inside the declaration of a. 
The old behavior would emit separate locations for each of the calls, the new 
behavior annotates each of the calls with the same location as the declaration. 
This causes the debugger to stop only once for the entire statement when using 
step over, and makes step into specific work.


https://reviews.llvm.org/D37529



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to