szepet added a comment. > Would it make sense to use the last element of the block edge's source for > the diagnostic location when the destination block is empty?
I do not think so. In the testfile `emptyConditionLoop` function is a great counter example since the last element of the source block is the `num = 1` which would not make sense (in my opinion). However, in this case the location of the terminator statement could be used (if there is any). If you are OK with that solution, I can update the patch. Repository: rC Clang https://reviews.llvm.org/D42266 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits