aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-05-19 00:22:07 +0000
committerAnna Zaks <ganna@apple.com>2012-05-19 00:22:07 +0000
commit591b5f53c0e11d87401b4804bb1be1a53f95c619 (patch)
tree642df1889c06294d36fafed3a654812e794d4987 /lib/StaticAnalyzer/Core/ExprEngineC.cpp
parentab7ad72f432810011041c5628b377f77cb1c81e6 (diff)
[analyzer] For locations, use isGLValue() instead of isLValue().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157088 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineC.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index cf94ac3060..8a02b2ca96 100644
--- a/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -50,7 +50,7 @@ void ExprEngine::VisitBinaryOperator(const BinaryOperator* B,
}
// Simulate the effects of a "store": bind the value of the RHS
// to the L-Value represented by the LHS.
- SVal ExprVal = B->isLValue() ? LeftV : RightV;
+ SVal ExprVal = B->isGLValue() ? LeftV : RightV;
evalStore(Tmp2, B, LHS, *it, state->BindExpr(B, LCtx, ExprVal),
LeftV, RightV);
continue;
@@ -165,7 +165,7 @@ void ExprEngine::VisitBinaryOperator(const BinaryOperator* B,
// In C++, assignment and compound assignment operators return an
// lvalue.
- if (B->isLValue())
+ if (B->isGLValue())
state = state->BindExpr(B, LCtx, location);
else
state = state->BindExpr(B, LCtx, Result);
@@ -332,7 +332,7 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex,
// Compute the type of the result.
QualType resultType = CastE->getType();
- if (CastE->isLValue())
+ if (CastE->isGLValue())
resultType = getContext().getPointerType(resultType);
bool Failed = false;
@@ -381,7 +381,7 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex,
case CK_MemberPointerToBoolean: {
// Recover some path-sensitivty by conjuring a new value.
QualType resultType = CastE->getType();
- if (CastE->isLValue())
+ if (CastE->isGLValue())
resultType = getContext().getPointerType(resultType);
const LocationContext *LCtx = Pred->getLocationContext();
SVal result = svalBuilder.getConjuredSymbolVal(NULL, CastE, LCtx,
@@ -408,7 +408,7 @@ void ExprEngine::VisitCompoundLiteralExpr(const CompoundLiteralExpr *CL,
const LocationContext *LC = Pred->getLocationContext();
state = state->bindCompoundLiteral(CL, LC, ILV);
- if (CL->isLValue())
+ if (CL->isGLValue())
B.generateNode(CL, Pred, state->BindExpr(CL, LC, state->getLValue(CL, LC)));
else
B.generateNode(CL, Pred, state->BindExpr(CL, LC, ILV));
@@ -459,7 +459,7 @@ void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
// UnknownVal.
if (InitVal.isUnknown()) {
QualType Ty = InitEx->getType();
- if (InitEx->isLValue()) {
+ if (InitEx->isGLValue()) {
Ty = getContext().getPointerType(Ty);
}
@@ -689,7 +689,7 @@ void ExprEngine::VisitUnaryOperator(const UnaryOperator* U,
}
case UO_Plus:
- assert(!U->isLValue());
+ assert(!U->isGLValue());
// FALL-THROUGH.
case UO_Deref:
case UO_AddrOf:
@@ -712,7 +712,7 @@ void ExprEngine::VisitUnaryOperator(const UnaryOperator* U,
case UO_LNot:
case UO_Minus:
case UO_Not: {
- assert (!U->isLValue());
+ assert (!U->isGLValue());
const Expr *Ex = U->getSubExpr()->IgnoreParens();
ProgramStateRef state = Pred->getState();
const LocationContext *LCtx = Pred->getLocationContext();
@@ -837,7 +837,7 @@ void ExprEngine::VisitIncrementDecrementOperator(const UnaryOperator* U,
// Since the lvalue-to-rvalue conversion is explicit in the AST,
// we bind an l-value if the operator is prefix and an lvalue (in C++).
- if (U->isLValue())
+ if (U->isGLValue())
state = state->BindExpr(U, LCtx, loc);
else
state = state->BindExpr(U, LCtx, U->isPostfix() ? V2 : Result);