[Mlir-commits] [mlir] [mlir][EmitC] Fix evaluation order of expressions (PR #93549)
Corentin Ferry
llvmlistbot at llvm.org
Wed May 29 00:13:30 PDT 2024
================
@@ -1316,7 +1316,11 @@ LogicalResult CppEmitter::emitOperand(Value value) {
FailureOr<int> precedence = getOperatorPrecedence(def);
if (failed(precedence))
return failure();
- bool encloseInParenthesis = precedence.value() < getExpressionPrecedence();
+
+ // Sub-expressions with equal or lower precedence need to be paranthesized,
----------------
cferry-AMD wrote:
```suggestion
// Sub-expressions with equal or lower precedence need to be parenthesized,
```
https://github.com/llvm/llvm-project/pull/93549
More information about the Mlir-commits
mailing list