diff options
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 9 | 
1 files changed, 2 insertions, 7 deletions
| diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 1abc5a31df7..61b6f7e577e 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -2368,7 +2368,7 @@ static bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {    }    if (NeedType) -    S.Diag(Loc, Diag, E->getType().getAsString(), SR); +    S.Diag(Loc, Diag, E->getType().getAsString(), E->getSourceRange());    else      S.Diag(Loc, Diag, E->getSourceRange());    return true; @@ -2463,13 +2463,8 @@ QualType Sema::CheckIncrementDecrementOperand(Expr *op, SourceLocation OpLoc) {    }    // At this point, we know we have a real, complex or pointer type.     // Now make sure the operand is a modifiable lvalue. -  Expr::isModifiableLvalueResult mlval = op->isModifiableLvalue(Context); -  if (mlval != Expr::MLV_Valid) { -    // FIXME: emit a more precise diagnostic... -    Diag(OpLoc, diag::err_typecheck_invalid_lvalue_incr_decr, -         op->getSourceRange()); +  if (CheckForModifiableLvalue(op, OpLoc, *this))      return QualType(); -  }    return resType;  } | 

