Skip to content

Commit 5a855d5

Browse files
authored
[clang-format] Added unittest of TableGen formatting w.r.t. block type calculation. (#87924)
1 parent 8b3b4a9 commit 5a855d5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

clang/unittests/Format/FormatTestTableGen.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,16 @@ TEST_F(FormatTestTableGen, MultiClass) {
290290
"}\n");
291291
}
292292

293+
TEST_F(FormatTestTableGen, MultiClassesWithPasteOperator) {
294+
// This is a sensitive example for the handling of the paste operators in
295+
// brace type calculation.
296+
verifyFormat("multiclass MultiClass1<int i> {\n"
297+
" def : Def#x<i>;\n"
298+
" def : Def#y<i>;\n"
299+
"}\n"
300+
"multiclass MultiClass2<int i> { def : Def#x<i>; }\n");
301+
}
302+
293303
TEST_F(FormatTestTableGen, Defm) {
294304
verifyFormat("defm : Multiclass<0>;\n");
295305

0 commit comments

Comments
 (0)