llvm-project
6eab083e - [mlir][emitc] Refactor brackets in expressions (#168267)

Commit
44 days ago
[mlir][emitc] Refactor brackets in expressions (#168267) This patch is a minor NFC-intended refactoring to the way emitting redundant parentheses is prevented. The current implementation pushes and later pops a fake low precedence into the precedence stack when emitting function calls. The new implementation adds a boolean argument to `emitOperand()` that explicity guarantees that the operand is being emitted between some kind of brackets, exempting the method from enforcing correct evaluation order w.r.t precedence and associativity up the expression tree.
Author
Parents
Loading