diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-25 14:18:57 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-25 14:18:57 +0000 |
commit | 143bf82ac5afba0757e6817a2c2bb970c20b32d3 (patch) | |
tree | 80a8fac0c26c37e510a315597d56a98cb3b69aa7 /lib/Analysis/Environment.cpp | |
parent | e9f4e5420895a75dd788e9891921e7781c1823b9 (diff) |
Add code for get the lvalue for string literals. Now we return a StringRegion
for StringLiteral lvalue evaluation, instead of directly returning a
loc::StringLiteralVal by the Environment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58138 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Environment.cpp')
-rw-r--r-- | lib/Analysis/Environment.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Analysis/Environment.cpp b/lib/Analysis/Environment.cpp index a9afa6d86b..f220ee7a12 100644 --- a/lib/Analysis/Environment.cpp +++ b/lib/Analysis/Environment.cpp @@ -42,13 +42,10 @@ SVal Environment::GetSVal(Expr* E, BasicValueFactory& BasicVals) const { return NonLoc::MakeVal(BasicVals, cast<IntegerLiteral>(E)); } - case Stmt::StringLiteralClass: - return Loc::MakeVal(cast<StringLiteral>(E)); - - // Casts where the source and target type are the same - // are no-ops. We blast through these to get the descendant - // subexpression that has a value. - + // Casts where the source and target type are the same + // are no-ops. We blast through these to get the descendant + // subexpression that has a value. + case Stmt::ImplicitCastExprClass: case Stmt::ExplicitCastExprClass: { CastExpr* C = cast<CastExpr>(E); |