From: Eli Friedman Date: Mon, 9 Nov 2009 04:20:47 +0000 (+0000) Subject: Explicitly note that pre-inc/dec lvalues are not supported yet, so that it X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e401cd5a487feee1165d3977aa3f4b68f44a3ca7;p=clang 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 --- 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) {