]> granicus.if.org Git - clang/commit
[analyzer; new edges] Omit subexpression back-edges that span multiple lines.
authorJordan Rose <jordan_rose@apple.com>
Mon, 3 Jun 2013 23:00:09 +0000 (23:00 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 3 Jun 2013 23:00:09 +0000 (23:00 +0000)
commite624524705ab660eb8d1feb9870ef2989fb2bdf4
tree7d2298f12a0e61dfc8ca82240934144d9ed92d48
parent22b0ad2d2a9c723bcdc94525a091fdbfbaa480fa
[analyzer; new edges] Omit subexpression back-edges that span multiple lines.

A.1 -> A -> B
becomes
A.1 -> B

This only applies if there's an edge from a subexpression to its parent
expression, and that is immediately followed by another edge from the
parent expression to a subsequent expression. Normally this is useful for
bringing the edges back to the left side of the code, but when the
subexpression is on a different line the backedge ends up looking strange,
and may even obscure code. In these cases, it's better to just continue
to the next top-level statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183164 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporter.cpp
test/Analysis/edges-new.mm