diff options
author | Anders Carlsson <andersca@mac.com> | 2007-11-30 22:47:59 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2007-11-30 22:47:59 +0000 |
commit | 7323a6297edad643c202594dcf3d9a174de96ca6 (patch) | |
tree | d72ee73fdeab47db45f44ab93f325513210e220f | |
parent | bdbb285aed1bb1e20090a16929f4c1da33d2d5c5 (diff) |
String literals are always valid LValues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44472 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | AST/Expr.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/AST/Expr.cpp b/AST/Expr.cpp index 0aee702c65..15fbb24a0d 100644 --- a/AST/Expr.cpp +++ b/AST/Expr.cpp @@ -296,6 +296,7 @@ Expr::isLvalueResult Expr::isLvalue() const { // the type looks fine, now check the expression switch (getStmtClass()) { case StringLiteralClass: // C99 6.5.1p4 + return LV_Valid; case ArraySubscriptExprClass: // C99 6.5.3p4 (e1[e2] == (*((e1)+(e2)))) // For vectors, make sure base is an lvalue (i.e. not a function call). if (cast<ArraySubscriptExpr>(this)->getBase()->getType()->isVectorType()) |