[clang] [CIR] Upstream binary assignments and comma (PR #135115)
Morris Hafner via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 11 07:05:27 PDT 2025
================
@@ -807,6 +808,65 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
VISITCOMP(EQ)
VISITCOMP(NE)
#undef VISITCOMP
+
+ mlir::Value VisitBinAssign(const BinaryOperator *e) {
+ const bool ignore = std::exchange(ignoreResultAssign, false);
+
+ mlir::Value rhs;
+ LValue lhs;
+
+ switch (e->getLHS()->getType().getObjCLifetime()) {
----------------
mmha wrote:
Hmm, I don't know about the performance implications (I'd expect them to be insignificant) but I find your suggestion to be less readable. I still need a `case Qualifiers::OCL_None:` with an `llvm_unreachable()` to satisfy clang-tidy and it just adds more branches to the function to follow
https://github.com/llvm/llvm-project/pull/135115
More information about the cfe-commits
mailing list