[Mlir-commits] [mlir] [mlir][EmitC] Emit parentheses when expression ops are used as operands (PR #93691)

Gil Rapaport llvmlistbot at llvm.org
Mon Jun 3 23:48:18 PDT 2024


================
@@ -1338,8 +1343,9 @@ LogicalResult CppEmitter::emitOperand(Value value) {
   }
 
   auto expressionOp = dyn_cast_if_present<ExpressionOp>(value.getDefiningOp());
-  if (expressionOp && shouldBeInlined(expressionOp))
+  if (expressionOp && shouldBeInlined(expressionOp)) {
     return emitExpression(expressionOp);
+  }
 
----------------
aniragil wrote:

nit: please restore the [single statement format](https://www.llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements)

https://github.com/llvm/llvm-project/pull/93691


More information about the Mlir-commits mailing list