From 8b4bc76a2323961f6f8502e0d5249e53ac41c6ac Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Wed, 9 May 2018 09:02:11 +0000 Subject: [clang-format] Respect BreakBeforeClosingBrace while calculating length Summary: This patch makes `getLengthToMatchingParen` respect the `BreakBeforeClosingBrace` ParenState for matching scope closers. In order to distinguish between paren states introduced by real vs. fake parens, I've added the token opening the ParensState to that struct. Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D46519 llvm-svn: 331857 --- clang/unittests/Format/FormatTestProto.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/unittests/Format/FormatTestProto.cpp') diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp index 4b1480b074a..9a6ae18fe37 100644 --- a/clang/unittests/Format/FormatTestProto.cpp +++ b/clang/unittests/Format/FormatTestProto.cpp @@ -486,6 +486,7 @@ TEST_F(FormatTestProto, AcceptsOperatorAsKeyInOptions) { " ccccccccccccccccccccccc: <\n" " operator: 1\n" " operator: 2\n" + " operator: 3\n" " operator { key: value }\n" " >\n" " >\n" -- cgit v1.2.3