[Mlir-commits] [mlir] [mlir][emitc] Don't emit extra semicolon after bracket (PR #122464)
Marius Brehler
llvmlistbot at llvm.org
Mon Jan 13 12:48:27 PST 2025
================
@@ -1607,6 +1602,11 @@ LogicalResult CppEmitter::emitOperation(Operation &op, bool trailingSemicolon) {
shouldBeInlined(cast<emitc::ExpressionOp>(op))))
return success();
+ // Never emit semicolon for operations that end with } or opaque.
----------------
marbre wrote:
We could update this to
```suggestion
// Never emit a semicolon for some operations, especially if ending with `}`.
```
as also `cf::CondBranchOp` and `emitc::IncludeOp` don't end with `}`.
https://github.com/llvm/llvm-project/pull/122464
More information about the Mlir-commits
mailing list