]> granicus.if.org Git - clang/commit
[analyzer] Create a temp region when a method is called on a struct rvalue.
authorJordan Rose <jordan_rose@apple.com>
Fri, 28 Sep 2012 17:15:21 +0000 (17:15 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 28 Sep 2012 17:15:21 +0000 (17:15 +0000)
commit0006ba445962621ed82ec84400a6b978205a3fbc
tree7ed95c9d505ee8e11846e304ca16e3e3d7882946
parent6f61df3e7256413dcb99afb9673f4206e3c4992c
[analyzer] Create a temp region when a method is called on a struct rvalue.

An rvalue has no address, but calling a C++ member function requires a
'this' pointer. This commit makes the analyzer create a temporary region
in which to store the struct rvalue and use as a 'this' pointer whenever
a member function is called on an rvalue, which is essentially what
CodeGen does.

More of <rdar://problem/12137950>. The last part is tracking down the
C++ FIXME in array-struct-region.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164829 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngine.cpp
test/Analysis/array-struct-region.cpp