[clang-format] Fixed indent issue when adding a comment at the end of a return type in named function declaration.
Differential Revision: https://reviews.llvm.org/D30646
llvm-svn: 297143
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 7ab0c75..54c5f27 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5325,6 +5325,11 @@
" vector<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>>\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);");
+
+ verifyFormat("template<typename T> // Templates on own line.\n"
+ "static int // Some comment.\n"
+ "MyFunction(int a);",
+ getLLVMStyle());
}
TEST_F(FormatTest, FormatsArrays) {