[clang] [clang-format] Add Options to break inside the TableGen DAGArg. (PR #83149)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 14 12:41:30 PDT 2024
================
@@ -332,6 +332,84 @@ TEST_F(FormatTestTableGen, Assert) {
verifyFormat("assert !le(DefVar1, 0), \"Assert1\";\n");
}
+TEST_F(FormatTestTableGen, DAGArgBreakElements) {
+ FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen);
+ Style.ColumnLimit = 60;
+ // By default, the DAGArg does not have a break inside.
+ verifyFormat("def Def : Parent {\n"
----------------
HazardyKnusperkeks wrote:
```suggestion
ASSERT_EQ(Style.TableGenBreakInsideDAGArg, FormatStyle::DAS_DontBreak);
verifyFormat("def Def : Parent {\n"
```
https://github.com/llvm/llvm-project/pull/83149
More information about the cfe-commits
mailing list