[cfe-commits] r44472 - /cfe/trunk/AST/Expr.cpp
Anders Carlsson
andersca at mac.com
Fri Nov 30 14:47:59 PST 2007
Author: andersca
Date: Fri Nov 30 16:47:59 2007
New Revision: 44472
URL: http://llvm.org/viewvc/llvm-project?rev=44472&view=rev
Log:
String literals are always valid LValues.
Modified:
cfe/trunk/AST/Expr.cpp
Modified: cfe/trunk/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Expr.cpp?rev=44472&r1=44471&r2=44472&view=diff
==============================================================================
--- cfe/trunk/AST/Expr.cpp (original)
+++ cfe/trunk/AST/Expr.cpp Fri Nov 30 16:47:59 2007
@@ -296,6 +296,7 @@
// 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())
More information about the cfe-commits
mailing list