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 | 0d2706f6b8c5d8767f9550ae7882f0dc5ffafe00 (patch) | |
tree | 402880cbfcc3f40ad19a8a2a19398d76900334a5 /clang/lib/Analysis/Environment.cpp | |
parent | d1aac353e5f0388ff40f6fdc78bbc474d45b5de3 (diff) | |
download | bcm5719-llvm-0d2706f6b8c5d8767f9550ae7882f0dc5ffafe00.tar.gz bcm5719-llvm-0d2706f6b8c5d8767f9550ae7882f0dc5ffafe00.zip |
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.
llvm-svn: 58138
Diffstat (limited to 'clang/lib/Analysis/Environment.cpp')
-rw-r--r-- | clang/lib/Analysis/Environment.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/Analysis/Environment.cpp b/clang/lib/Analysis/Environment.cpp index a9afa6d86bd..f220ee7a12c 100644 --- a/clang/lib/Analysis/Environment.cpp +++ b/clang/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); |