diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-16 17:00:50 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-16 17:00:50 +0000 |
commit | 69987d5415f2260540be1cafa460362ad74ae849 (patch) | |
tree | d9cd541a6924b550e762c77d1f06538934b50f07 /clang/unittests/Format/FormatTest.cpp | |
parent | 99b0a6a03a3ad7285478242b6522683112888a63 (diff) | |
download | bcm5719-llvm-69987d5415f2260540be1cafa460362ad74ae849.tar.gz bcm5719-llvm-69987d5415f2260540be1cafa460362ad74ae849.zip |
Fix a bug where we would move a following line into a comment.
Before: Constructor() : a(a), // comment a(a) {}
After: Constructor() : a(a), // comment
a(a) {}
Needed this as a quick fix. Will add more tests for this in a future
commit.
llvm-svn: 172624
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 3c92d82f8fb..df050a4e298 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -746,6 +746,11 @@ TEST_F(FormatTest, ConstructorInitializers) { " : aaaaaaaaaaaaa(aaaaaaaaaaaaaa),\n" " aaaaaaaaaaaaa(aaaaaaaaaaaaaa),\n" " aaaaaaaaaaaaa(aaaaaaaaaaaaaa) {}"); + verifyGoogleFormat( + "SomeClass::Constructor()\n" + " : aaaaaaaaaaaaa(aaaaaaaaaaaaaa), // Some comment\n" + " aaaaaaaaaaaaa(aaaaaaaaaaaaaa),\n" + " aaaaaaaaaaaaa(aaaaaaaaaaaaaa) {}"); verifyFormat( "SomeClass::Constructor()\n" |