aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-28 15:16:31 +0000
committerDaniel Jasper <djasper@google.com>2013-01-28 15:16:31 +0000
commit83f25ba0499f18b91501fb6538c49ebc7827bea0 (patch)
tree0d7b274b1b0d4afc41930c01fc83334a27f3d177 /unittests/Format/FormatTest.cpp
parent02b771e3110f7799f93d5d17dc6fefc5713387c3 (diff)
Let clang-format break after a function's return type.
Before: TypeSpecDecl *TypeSpecDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *II, Type *T) {} After: TypeSpecDecl * TypeSpecDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *II, Type *T) {} This fixes llvm.org/PR14717. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 417dc9e9a2..6b9b84de26 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -1504,13 +1504,13 @@ TEST_F(FormatTest, FormatsFunctionTypes) {
verifyFormat("int(*func)(void *);");
}
-TEST_F(FormatTest, DoesNotBreakBeforePointerOrReference) {
- verifyFormat("int *someFunction(int LoooooooooooooooongParam1,\n"
- " int LoooooooooooooooongParam2) {\n}");
+TEST_F(FormatTest, BreaksFunctionDeclarations) {
+ verifyFormat("int *someFunction(int LoooooooooooooooooooongParam1,\n"
+ " int LoooooooooooooooooooongParam2) {\n}");
verifyFormat(
- "TypeSpecDecl *TypeSpecDecl::Create(ASTContext &C, DeclContext *DC,\n"
- " SourceLocation L, IdentifierIn *II,\n"
- " Type *T) {\n}");
+ "TypeSpecDecl *\n"
+ "TypeSpecDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,\n"
+ " IdentifierIn *II, Type *T) {\n}");
}
TEST_F(FormatTest, LineStartsWithSpecialCharacter) {