llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-format Author: Hirofumi Nakamura (hnakamura5) <details> <summary>Changes</summary> The test I mentioned here https://github.com/llvm/llvm-project/pull/87450 . This is a regression test to detect the case block type is not calculated due to the paste `#` operator misunderstood as preprocessor. --- Full diff: https://github.com/llvm/llvm-project/pull/87924.diff 1 Files Affected: - (modified) clang/unittests/Format/FormatTestTableGen.cpp (+10) ``````````diff 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"); `````````` </details> https://github.com/llvm/llvm-project/pull/87924 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits