[clang] [CIR] Upstream LValue Unary Inc & Dec for ComplexType (PR #160201)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 23 08:46:20 PDT 2025
================
@@ -913,8 +913,7 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) {
assert(e->isPrefix() && "Prefix operator in unexpected state!");
if (e->getType()->isAnyComplexType()) {
- cgm.errorNYI(e->getSourceRange(), "UnaryOp complex inc/dec");
- lv = LValue();
+ emitComplexPrePostIncDec(e, lv, kind, true /*isPre=*/);
----------------
andykaylor wrote:
```suggestion
emitComplexPrePostIncDec(e, lv, kind, /*isPre=*/true);
```
https://github.com/llvm/llvm-project/pull/160201
More information about the cfe-commits
mailing list