Automatically munch semicolons after blocks.
While it is mostly a user error to have the extra semicolon,
formatting it graciously will correctly format in the cases
where we do not fully understand the code (macros).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192543 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 6e8179a..afe9c8b 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -6854,5 +6854,12 @@
getGoogleStyle()));
}
+TEST_F(FormatTest, MunchSemicolonAfterBlocks) {
+ verifyFormat("MY_CLASS(C) {\n"
+ " int i;\n"
+ " int j;\n"
+ "};");
+}
+
} // end namespace tooling
} // end namespace clang