forked from OSchip/llvm-project
String literals are always valid LValues.
llvm-svn: 44472
This commit is contained in:
parent
c9bcda94ae
commit
7a9a38abe0
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue