[clang] 5a855d5 - [clang-format] Added unittest of TableGen formatting w.r.t. block type calculation. (#87924)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 8 05:12:16 PDT 2024
Author: Hirofumi Nakamura
Date: 2024-04-08T21:12:12+09:00
New Revision: 5a855d51272608e2122c45d86676aa2247a11d19
URL: https://github.com/llvm/llvm-project/commit/5a855d51272608e2122c45d86676aa2247a11d19
DIFF: https://github.com/llvm/llvm-project/commit/5a855d51272608e2122c45d86676aa2247a11d19.diff
LOG: [clang-format] Added unittest of TableGen formatting w.r.t. block type calculation. (#87924)
Added:
Modified:
clang/unittests/Format/FormatTestTableGen.cpp
Removed:
################################################################################
diff --git a/clang/unittests/Format/FormatTestTableGen.cpp b/clang/unittests/Format/FormatTestTableGen.cpp
index 8ca6bf97e5a6b1..d235c85c8eaa0f 100644
--- a/clang/unittests/Format/FormatTestTableGen.cpp
+++ b/clang/unittests/Format/FormatTestTableGen.cpp
@@ -290,6 +290,16 @@ TEST_F(FormatTestTableGen, MultiClass) {
"}\n");
}
+TEST_F(FormatTestTableGen, MultiClassesWithPasteOperator) {
+ // This is a sensitive example for the handling of the paste operators in
+ // brace type calculation.
+ verifyFormat("multiclass MultiClass1<int i> {\n"
+ " def : Def#x<i>;\n"
+ " def : Def#y<i>;\n"
+ "}\n"
+ "multiclass MultiClass2<int i> { def : Def#x<i>; }\n");
+}
+
TEST_F(FormatTestTableGen, Defm) {
verifyFormat("defm : Multiclass<0>;\n");
More information about the cfe-commits
mailing list