diff options
| author | Vitaly Buka <vitalybuka@google.com> | 2024-03-31 22:43:06 -0700 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2024-03-31 22:43:06 -0700 |
| commit | 7aced1ab9772075ef9a77b1ba4a6456968f27906 (patch) | |
| tree | 995152f5bc707d6c2160f92a879eb52f8fc2a3a9 /clang/unittests/Format/FormatTestTableGen.cpp | |
| parent | fd7a6d054b1e027c036a1cff5ddc7ee81461f90a (diff) | |
| parent | 1e442ac4c33ac36d33e191c2d18ff594d8a5d11a (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/vitalybuka/spr/main.analysis-exclude-llvmallowruntimeubsancheck-from-aliassettracker
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'clang/unittests/Format/FormatTestTableGen.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTestTableGen.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestTableGen.cpp b/clang/unittests/Format/FormatTestTableGen.cpp index c96866f0840f..8ca6bf97e5a6 100644 --- a/clang/unittests/Format/FormatTestTableGen.cpp +++ b/clang/unittests/Format/FormatTestTableGen.cpp @@ -411,6 +411,38 @@ TEST_F(FormatTestTableGen, DAGArgBreakAll) { Style); } +TEST_F(FormatTestTableGen, DAGArgAlignment) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen); + Style.ColumnLimit = 60; + Style.TableGenBreakInsideDAGArg = FormatStyle::DAS_BreakAll; + Style.TableGenBreakingDAGArgOperators = {"ins", "outs"}; + verifyFormat("def Def : Parent {\n" + " let dagarg = (ins\n" + " a:$src1,\n" + " aa:$src2,\n" + " aaa:$src3\n" + " )\n" + "}\n", + Style); + verifyFormat("def Def : Parent {\n" + " let dagarg = (not a:$src1, aa:$src2, aaa:$src2)\n" + "}\n", + Style); + Style.AlignConsecutiveTableGenBreakingDAGArgColons.Enabled = true; + verifyFormat("def Def : Parent {\n" + " let dagarg = (ins\n" + " a :$src1,\n" + " aa :$src2,\n" + " aaa:$src3\n" + " )\n" + "}\n", + Style); + verifyFormat("def Def : Parent {\n" + " let dagarg = (not a:$src1, aa:$src2, aaa:$src2)\n" + "}\n", + Style); +} + TEST_F(FormatTestTableGen, CondOperatorAlignment) { FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen); Style.ColumnLimit = 60; |
