diff options
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 1 | ||||
-rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 7f5df7dfba7..2762979b6bd 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -854,6 +854,7 @@ void UnwrappedLineParser::parseStructuralElement() { Style.Language == FormatStyle::LK_Java) && FormatTok->is(Keywords.kw_interface)) { parseRecord(); + addUnwrappedLine(); break; } diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index e01637bfad4..0f9f38240a3 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -665,7 +665,8 @@ TEST_F(FormatTestJS, ClassDeclarations) { TEST_F(FormatTestJS, InterfaceDeclarations) { verifyFormat("interface I {\n" " x: string;\n" - "}"); + "}\n" + "var y;"); } TEST_F(FormatTestJS, MetadataAnnotations) { |