diff options
author | John McCall <rjmccall@apple.com> | 2010-11-24 05:12:34 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-11-24 05:12:34 +0000 |
commit | 7eb0a9eb0cde8444b97f9c5b713d9be7a6f1e607 (patch) | |
tree | e828a6fb6060ac7711b5209210bfd31c15de71af /lib/Sema/SemaStmt.cpp | |
parent | 834f9de3d3d76986d09f41725a70ba45a3e2aecd (diff) |
Switch a lot of call-sites over to using the new value-kind calculations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 68b7a8c163..48d2b47c8a 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -977,8 +977,7 @@ Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc, diag::err_non_variable_decl_in_for)); } else { Expr *FirstE = cast<Expr>(First); - if (!FirstE->isTypeDependent() && - FirstE->isLvalue(Context) != Expr::LV_Valid) + if (!FirstE->isTypeDependent() && !FirstE->isLValue()) return StmtError(Diag(First->getLocStart(), diag::err_selector_element_not_lvalue) << First->getSourceRange()); @@ -1312,13 +1311,13 @@ static bool CheckAsmLValue(const Expr *E, Sema &S) { if (E->isTypeDependent()) return false; - if (E->isLvalue(S.Context) == Expr::LV_Valid) + if (E->isLValue()) return false; // Cool, this is an lvalue. // Okay, this is not an lvalue, but perhaps it is the result of a cast that we // are supposed to allow. const Expr *E2 = E->IgnoreParenNoopCasts(S.Context); - if (E != E2 && E2->isLvalue(S.Context) == Expr::LV_Valid) { + if (E != E2 && E2->isLValue()) { if (!S.getLangOptions().HeinousExtensions) S.Diag(E2->getLocStart(), diag::err_invalid_asm_cast_lvalue) << E->getSourceRange(); |