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

Wolfgang Pieb via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 28 16:57:42 PST 2016


wolfgangp added a comment.



> Clang (with patch)

>  3, 5, 4, 5, 7

>  9, 11, 10, 11, 14

> 

> So that's somewhat problematic - we shouldn't visit 11 at all. (but we are today, as is GCC... so maybe NBD?)


Well, if op&& is overloaded, wouldn't we lose the short-circuit property? If so it makes sense to visit 11.

> I think using the end of the condition is problematic/confusing. I'm not sure why this doesn't show up in the primitive value version, but it seems like it should (& we should end up stepping to the end of the condition (which would be the close paren of the function call, not the close paren of the 'if ()'))


There is short-circuit in the primitive value version, so we wouldn't stop there.

> Perhaps we should use the close paren of the 'if ()' but tehre's no source location for that readily available - I guess the way to get there is to navigate to the next token from the end of the condition expression... ?


I agree, The close paren of the if() would be better.


http://reviews.llvm.org/D8822





More information about the cfe-commits mailing list