diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-07-15 18:12:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-07-15 18:12:28 +0000 |
commit | 06de03756380413c1137dd2ccee5348d206f71b2 (patch) | |
tree | c91e6ed26e67e9dfed7ffde730ac87d5c19d591a /lib/CodeGen/CGExpr.cpp | |
parent | 5467209f23097d5b0fc628c18aaa85e73d386598 (diff) |
Spell isPRValue() properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 94fb086b4c..db4d23187d 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1753,8 +1753,7 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { return EmitUnsupportedLValue(E, "unexpected cast lvalue"); case CastExpr::CK_NoOp: - if (E->getSubExpr()->getType()->isRecordType() || - E->getSubExpr()->isLvalue(getContext()) == Expr::LV_Valid) { + if (!E->getSubExpr()->Classify(getContext()).isPRValue()) { LValue LV = EmitLValue(E->getSubExpr()); if (LV.isPropertyRef()) { QualType QT = E->getSubExpr()->getType(); |