summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-10-12 22:46:56 +0000
committerManuel Klimek <klimek@google.com>2013-10-12 22:46:56 +0000
commitb212f3baa1c17e7739d4cebba3b3697292cf796e (patch)
tree169802cc8d10976e930f654ad6f49c54a2609000 /clang/unittests/Format/FormatTest.cpp
parent0b48c738e649856ef92fb542f5bfc3adaa065c31 (diff)
downloadbcm5719-llvm-b212f3baa1c17e7739d4cebba3b3697292cf796e.tar.gz
bcm5719-llvm-b212f3baa1c17e7739d4cebba3b3697292cf796e.zip
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). llvm-svn: 192543
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 6e8179a3068..afe9c8b1cc2 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -6854,5 +6854,12 @@ TEST_F(FormatTest, SupportsCRLF) {
getGoogleStyle()));
}
+TEST_F(FormatTest, MunchSemicolonAfterBlocks) {
+ verifyFormat("MY_CLASS(C) {\n"
+ " int i;\n"
+ " int j;\n"
+ "};");
+}
+
} // end namespace tooling
} // end namespace clang
OpenPOWER on IntegriCloud