[clang] c819dce - [clang-format] Add a regression test for aligning macros with keywords.

Marek Kurdej via cfe-commits cfe-commits at lists.llvm.org
Tue May 3 02:09:50 PDT 2022


Author: Marek Kurdej
Date: 2022-05-03T11:09:38+02:00
New Revision: c819dce2d304817ae7f47628067092f4353a148e

URL: https://github.com/llvm/llvm-project/commit/c819dce2d304817ae7f47628067092f4353a148e
DIFF: https://github.com/llvm/llvm-project/commit/c819dce2d304817ae7f47628067092f4353a148e.diff

LOG: [clang-format] Add a regression test for aligning macros with keywords.

Test from issue https://github.com/llvm/llvm-project/issues/54953.

Added: 
    

Modified: 
    clang/unittests/Format/FormatTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index da25395b7df49..37f32691a1d36 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -16030,6 +16030,10 @@ TEST_F(FormatTest, AlignConsecutiveMacros) {
                "#define ccc  (5)",
                Style);
 
+  verifyFormat("#define true  1\n"
+               "#define false 0",
+               Style);
+
   verifyFormat("#define f(x)         (x * x)\n"
                "#define fff(x, y, z) (x * y + z)\n"
                "#define ffff(x, y)   (x - y)",


        


More information about the cfe-commits mailing list