diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-11 14:23:32 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-11 14:23:32 +0000 |
commit | fd8c4b1321165c9ac6de235ceb74b6bcb4e43296 (patch) | |
tree | 364bd0c0ca6f0869c508609e571ba8f754c86201 /clang/unittests/Format/FormatTest.cpp | |
parent | e3b7e2db702604aa7270510e75a8f20763294d86 (diff) | |
download | bcm5719-llvm-fd8c4b1321165c9ac6de235ceb74b6bcb4e43296.tar.gz bcm5719-llvm-fd8c4b1321165c9ac6de235ceb74b6bcb4e43296.zip |
Improve handling of trailing declaration annotations.
Before:
void aaaaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) GUARDED_BY(
aaaaaaaaaaaaa);
After:
void aaaaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
GUARDED_BY(aaaaaaaaaaaaa);
Also did some formatting cleanups with clang-format on the way.
llvm-svn: 172200
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 e60ed3722e2..47e6bdd114f 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -741,6 +741,11 @@ TEST_F(FormatTest, BreaksDesireably) { " }\n }\n}"); } +TEST_F(FormatTest, DoesNotBreakTrailingAnnotation) { + verifyFormat("void aaaaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)\n" + " GUARDED_BY(aaaaaaaaaaaaa);"); +} + TEST_F(FormatTest, BreaksAccordingToOperatorPrecedence) { verifyFormat( "if (aaaaaaaaaaaaaaaaaaaaaaaaa ||\n" |