From 9c5ac63785b5aac0c85b57637409869b27983bfe Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Mon, 19 Feb 2018 16:00:21 +0000 Subject: [clang-format] Fix text proto extension scope opening detection Summary: This fixes the detection of scope openers in text proto extensions; previously they were not detected correctly leading to instances like: ``` msg { [aa.bb ] { key: value } } ``` Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D43469 llvm-svn: 325513 --- clang/unittests/Format/FormatTestTextProto.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/unittests/Format/FormatTestTextProto.cpp') diff --git a/clang/unittests/Format/FormatTestTextProto.cpp b/clang/unittests/Format/FormatTestTextProto.cpp index 97326cfe0ac..17cde61d2af 100644 --- a/clang/unittests/Format/FormatTestTextProto.cpp +++ b/clang/unittests/Format/FormatTestTextProto.cpp @@ -389,6 +389,14 @@ TEST_F(FormatTestTextProto, FormatsExtensions) { " keyyyyyyyyyyyyyy: valuuuuuuuuuuuuuuuuuuuuuuuuue\n" " }\n" "}"); + verifyFormat( + "aaaaaaaaaaaaaaa {\n" + " bbbbbb {\n" + " [a.b/cy] {\n" + " eeeeeeeeeeeee: \"The lazy coo cat jumps over the lazy hot dog\"\n" + " }\n" + " }\n" + "}"); } TEST_F(FormatTestTextProto, NoSpaceAfterPercent) { -- cgit v1.2.3