diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-11-09 04:20:47 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-11-09 04:20:47 +0000 |
commit | e401cd5a487feee1165d3977aa3f4b68f44a3ca7 (patch) | |
tree | e31e99c08b4236e93b46a874f21fcb995f780627 /lib/CodeGen/CGExpr.cpp | |
parent | 8e2a9d8adbd2169b46c2edff5b267b05df3febb0 (diff) |
Explicitly note that pre-inc/dec lvalues are not supported yet, so that it
doesn't crash. (Such expressions are valid in C++, but not in C.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86513 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 15cb72e9fb..63041fee82 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -919,13 +919,17 @@ LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) { return LV; } case UnaryOperator::Real: - case UnaryOperator::Imag: + case UnaryOperator::Imag: { LValue LV = EmitLValue(E->getSubExpr()); unsigned Idx = E->getOpcode() == UnaryOperator::Imag; return LValue::MakeAddr(Builder.CreateStructGEP(LV.getAddress(), Idx, "idx"), MakeQualifiers(ExprTy)); } + case UnaryOperator::PreInc: + case UnaryOperator::PreDec: + return EmitUnsupportedLValue(E, "pre-inc/dec expression"); + } } LValue CodeGenFunction::EmitStringLiteralLValue(const StringLiteral *E) { |