Issue 177060
Summary [clang-format] Line Breaking in TableGen Class Parameters/DAGs
Labels clang-format
Assignees
Reporter lenary
    If I run `clang-format -i llvm/lib/Target/RISCV/RISCVGISel.td` on `main` today (let's say `435589566108eab07eb516e5e722234bd74af7b8`), I get the following diff (extracted from lots of changes, but this is the best example):

```diff
-def : Pat<(XLenVT (setult (PtrVT GPR:$rs1), (PtrVT GPR:$rs2))),
-          (SLTU GPR:$rs1, GPR:$rs2)>;
+def : Pat<(XLenVT(setult(PtrVT GPR:$rs1), (PtrVT GPR:$rs2))), (SLTU GPR:$rs1,
+ GPR:$rs2)>;
```


I think it's pretty weird that we're choosing to break within the second DAG, rather than between the DAGs (how this was originally written).

I don't know why clang-format has removed the spaces in the first DAG argument either.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to