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 | 7a9a38abe026a976a34507698735532a36f0cd44 (patch) | |
| tree | 9a01668dea081374ecc58fe55ea004e843dcf486 | |
| parent | c9bcda94ae403a7b0679ea7f6c20ea7548c017dd (diff) | |
| download | bcm5719-llvm-7a9a38abe026a976a34507698735532a36f0cd44.tar.gz bcm5719-llvm-7a9a38abe026a976a34507698735532a36f0cd44.zip  | |
String literals are always valid LValues.
llvm-svn: 44472
| -rw-r--r-- | clang/AST/Expr.cpp | 1 | 
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/AST/Expr.cpp b/clang/AST/Expr.cpp index 0aee702c65d..15fbb24a0d4 100644 --- a/clang/AST/Expr.cpp +++ b/clang/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())  | 

