]> granicus.if.org Git - clang/commit
[analyzer; new edges] Improve enclosing contexts for logical expressions.
authorJordan Rose <jordan_rose@apple.com>
Mon, 3 Jun 2013 22:59:53 +0000 (22:59 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 3 Jun 2013 22:59:53 +0000 (22:59 +0000)
commit9d9b494aa36ceeb823c48acf04d2d7677174be88
treea2c164ff90e006220dffbe9e647a5203536a6b49
parent96f1061fbe59faff5b266a3a04061cefcfe03e2f
[analyzer; new edges] Improve enclosing contexts for logical expressions.

The old edge builder didn't have a notion of nested statement contexts,
so there was no special treatment of a logical operator inside an if
(or inside another logical operator). The new edge builder always tries
to establish the full context up to the top-level statement, so it's
important to know how much context has been established already rather
than just checking the innermost context.

This restores some of the old behavior for the old edge generation:
the context of a logical operator's non-controlling expression is the
subexpression in the old edge algorithm, but the entire operator
expression in the new algorithm.

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