[PATCH] D42266: [analyzer] Prevent AnalyzerStatsChecker from crash

Peter Szecsi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 21 13:55:08 PST 2018

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.

  rC Clang


More information about the cfe-commits mailing list