clang-format: Fix return type line break decision.
This accidentally introduced by r186077, as function names were not
correctly recognized in templated declarations.
Before:
template <class TemplateIt>
SomeReturnType
SomeFunction(TemplateIt begin, TemplateIt end, TemplateIt* stop) {}
After:
template <class TemplateIt>
SomeReturnType SomeFunction(TemplateIt begin, TemplateIt end,
TemplateIt* stop) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188665 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 27800cd..e9384c4 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -2523,6 +2523,10 @@
// 1) break amongst arguments.
verifyFormat("Aaaaaaaaaaaaaa bbbbbbbbbbbbbb(Cccccccccccccc cccccccccccccc,\n"
" Cccccccccccccc cccccccccccccc);");
+ verifyFormat(
+ "template <class TemplateIt>\n"
+ "SomeReturnType SomeFunction(TemplateIt begin, TemplateIt end,\n"
+ " TemplateIt *stop) {}");
// 2) break after return type.
verifyFormat(
@@ -3859,12 +3863,11 @@
"SomeLoooooooooooooooooooooongType<\n"
" typename some_namespace::SomeOtherType<A>::Type>\n"
"Function() {}");
- verifyFormat(
- "aaaaaaaaaaaaaaaa::aaaaaaaaaaaaaaaa<aaaaaaaaaaaaa, aaaaaaaaaaaa>\n"
- " aaaaaaaaaaaaaaaaaaaaaaa;",
- getGoogleStyle());
verifyGoogleFormat(
+ "aaaaaaaaaaaaaaaa::aaaaaaaaaaaaaaaa<aaaaaaaaaaaaa, aaaaaaaaaaaa>\n"
+ " aaaaaaaaaaaaaaaaaaaaaaa;");
+ verifyGoogleFormat(
"TypeSpecDecl* TypeSpecDecl::Create(ASTContext& C, DeclContext* DC,\n"
" SourceLocation L) {}");
verifyGoogleFormat(