diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-05-09 09:02:11 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-05-09 09:02:11 +0000 |
commit | 5d18b5a0d385810df7782f1d4fb698e7ff075c1e (patch) | |
tree | c957236adfc62970f30794c2946388ffdca04002 /unittests/Format/FormatTestProto.cpp | |
parent | 473af992c6a5b71690bef4f4e7986947d47c8f84 (diff) | |
download | clang-5d18b5a0d385810df7782f1d4fb698e7ff075c1e.tar.gz |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTestProto.cpp')
-rw-r--r-- | unittests/Format/FormatTestProto.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestProto.cpp b/unittests/Format/FormatTestProto.cpp index 4b1480b074..9a6ae18fe3 100644 --- a/unittests/Format/FormatTestProto.cpp +++ b/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" |