diff options
| author | Daniel Jasper <djasper@google.com> | 2014-06-10 10:42:26 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-06-10 10:42:26 +0000 |
| commit | 908180574e6d09eba543b77e76b01c06865c78ff (patch) | |
| tree | da0be6baaa6926470afcd7483f6b5d84fe2cdf92 /clang/unittests/Format/FormatTest.cpp | |
| parent | 9d63b5eb7f00f8072b74fd701fc89f5060d7aff9 (diff) | |
| download | bcm5719-llvm-908180574e6d09eba543b77e76b01c06865c78ff.tar.gz bcm5719-llvm-908180574e6d09eba543b77e76b01c06865c78ff.zip | |
clang-format: Fix enum formatting with specific comment.
Before:
enum Fruit { //
APPLE,
PEAR };
After:
enum Fruit { //
APPLE,
PEAR
};
llvm-svn: 210522
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 02636a70160..baf05a9b747 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -1900,6 +1900,10 @@ TEST_F(FormatTest, FormatsEnum) { "\n" " THREE\n" "}")); + verifyFormat("enum E { // comment\n" + " ONE,\n" + " TWO\n" + "};"); } TEST_F(FormatTest, FormatsEnumsWithErrors) { @@ -5410,7 +5414,8 @@ TEST_F(FormatTest, LayoutCxx11BraceInitializers) { " BracedList{ // comment 1 (Forcing interesting break)\n" " param1, param2,\n" " // comment 2\n" - " param3, param4 });", + " param3, param4\n" + " });", ExtraSpaces); verifyFormat( "std::this_thread::sleep_for(\n" |

