]> granicus.if.org Git - clang/commit
[analyzer; alternate edges] improve support for edges with PseudoObjectExprs.
authorTed Kremenek <kremenek@apple.com>
Fri, 17 May 2013 09:41:40 +0000 (09:41 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 17 May 2013 09:41:40 +0000 (09:41 +0000)
commite9aae62e8bca3abfc1dc36f67845444291171e13
tree029e5ca30fcf60334bf77518f108e55a333f3510
parent399914b7a61a3823cc74ef3e47b1cde42528b9bf
[analyzer; alternate edges] improve support for edges with PseudoObjectExprs.

This optimizes some spurious edges resulting from PseudoObjectExprs.
This required far more changes than I anticipated.  The current
ParentMap does not record any hierarchy information between
a PseudoObjectExpr and its *semantic* expressions that may be
wrapped in OpaqueValueExprs, which are the expressions actually
laid out in the CFG.  This means the arrow pruning logic could
not map from an expression to its containing PseudoObjectExprs.

To solve this, this patch adds a variant of ParentMap that
returns the "semantic" parentage of expressions (essentially
as they are viewed by the CFG).  This alternate ParentMap is then
used by the arrow reducing logic to identify edges into pseudo
object expressions, and then eliminate them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182083 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ParentMap.h
include/clang/Analysis/AnalysisContext.h
lib/AST/ParentMap.cpp
lib/Analysis/AnalysisDeclContext.cpp
lib/StaticAnalyzer/Core/BugReporter.cpp