]> granicus.if.org Git - clang/commit
[analyzer] When binding to a ParenExpr, bind to its inner expression instead.
authorJordan Rose <jordan_rose@apple.com>
Wed, 17 Oct 2012 19:35:44 +0000 (19:35 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 17 Oct 2012 19:35:44 +0000 (19:35 +0000)
commitd4ce811ae08398e357c8ce3e707ba5f2aa0041a5
treeea1b27bdfb6358d3627ca4c3c2639656385f5e9b
parentf1e67d75fc922ff905de9faa6326bb1a96685ec1
[analyzer] When binding to a ParenExpr, bind to its inner expression instead.

This actually looks through several kinds of expression, such as
OpaqueValueExpr and ExprWithCleanups. The idea is that binding and lookup
should be consistent, and so if the environment needs to be modified later,
the code doing the modification will not have to manually look through these
"transparent" expressions to find the real binding to change.

This is necessary for proper updating of struct rvalues as described in
the previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166121 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
lib/StaticAnalyzer/Core/Environment.cpp
test/Analysis/array-struct-region.cpp