]> granicus.if.org Git - clang/commit
[analyzer] Make sure a materialized temporary matches its bindings.
authorJordan Rose <jordan_rose@apple.com>
Fri, 22 Feb 2013 01:51:15 +0000 (01:51 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 22 Feb 2013 01:51:15 +0000 (01:51 +0000)
commit5e5440ba9c135f523f72e7e7c5da59d390d697c5
tree484f8a826bd0c90edab9f2fb8826f3b0a3411e53
parentf08740ba5903d089a53cc315c19286e2189f9ff3
[analyzer] Make sure a materialized temporary matches its bindings.

This is a follow-up to r175830, which made sure a temporary object region
created for, say, a struct rvalue matched up with the initial bindings
being stored into it. This does the same for the case in which the AST
actually tells us that we need to create a temporary via a
MaterializeObjectExpr. I've unified the two code paths and moved a static
helper function onto ExprEngine.

This also caused a bit of test churn, causing us to go back to describing
temporary regions without a 'const' qualifier. This seems acceptable; it's
our behavior from a few months ago.

<rdar://problem/13265460> (part 2)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175854 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lib/StaticAnalyzer/Core/ExprEngine.cpp
lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
test/Analysis/stack-addr-ps.cpp
test/Analysis/temporaries.cpp