aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRCXXExprEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-11-24 13:08:51 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-11-24 13:08:51 +0000
commitd706434b0231c76fd9acf30060646a7aa8f69aef (patch)
tree84ea6bde3550736b956941dfe3ed50fb377cf1ee /lib/Checker/GRCXXExprEngine.cpp
parent13cf5e2e223ebfc8ec0459913b2fc9ec1e5fa760 (diff)
Let StackFrameContext represent if the call expr is evaluated as lvalue.
This is required for supporting const reference to temporary objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRCXXExprEngine.cpp')
-rw-r--r--lib/Checker/GRCXXExprEngine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Checker/GRCXXExprEngine.cpp b/lib/Checker/GRCXXExprEngine.cpp
index e9939af1eb..4a0fdc66ed 100644
--- a/lib/Checker/GRCXXExprEngine.cpp
+++ b/lib/Checker/GRCXXExprEngine.cpp
@@ -100,7 +100,7 @@ void GRExprEngine::CreateCXXTemporaryObject(const Expr *Ex, ExplodedNode *Pred,
void GRExprEngine::VisitCXXConstructExpr(const CXXConstructExpr *E,
const MemRegion *Dest,
ExplodedNode *Pred,
- ExplodedNodeSet &Dst) {
+ ExplodedNodeSet &Dst, bool asLValue) {
if (!Dest)
Dest = ValMgr.getRegionManager().getCXXObjectRegion(E,
Pred->getLocationContext());
@@ -125,7 +125,7 @@ void GRExprEngine::VisitCXXConstructExpr(const CXXConstructExpr *E,
// The callee stack frame context used to create the 'this' parameter region.
const StackFrameContext *SFC = AMgr.getStackFrame(CD,
Pred->getLocationContext(),
- E, Builder->getBlock(), Builder->getIndex());
+ E, asLValue, Builder->getBlock(), Builder->getIndex());
const CXXThisRegion *ThisR =getCXXThisRegion(E->getConstructor()->getParent(),
SFC);
@@ -153,7 +153,7 @@ void GRExprEngine::VisitCXXDestructor(const CXXDestructorDecl *DD,
// Create the context for 'this' region.
const StackFrameContext *SFC = AMgr.getStackFrame(DD,
Pred->getLocationContext(),
- S, Builder->getBlock(),
+ S, false, Builder->getBlock(),
Builder->getIndex());
const CXXThisRegion *ThisR = getCXXThisRegion(DD->getParent(), SFC);
@@ -239,7 +239,7 @@ void GRExprEngine::EvalMethodCall(const CallExpr *MCE, const CXXMethodDecl *MD,
const StackFrameContext *SFC = AMgr.getStackFrame(MD,
Pred->getLocationContext(),
- MCE,
+ MCE, false,
Builder->getBlock(),
Builder->getIndex());
const CXXThisRegion *ThisR = getCXXThisRegion(MD->getParent(), SFC);