summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestProto.cpp
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2018-05-09 09:02:11 +0000
committerKrasimir Georgiev <krasimir@google.com>2018-05-09 09:02:11 +0000
commit8b4bc76a2323961f6f8502e0d5249e53ac41c6ac (patch)
treeec8c313955390b1e2e991e6276b3f84959f30222 /clang/unittests/Format/FormatTestProto.cpp
parent8e1c75a4c51528c0ad3a41300e9394df0b50b752 (diff)
downloadbcm5719-llvm-8b4bc76a2323961f6f8502e0d5249e53ac41c6ac.tar.gz
bcm5719-llvm-8b4bc76a2323961f6f8502e0d5249e53ac41c6ac.zip
[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
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r--clang/unittests/Format/FormatTestProto.cpp1
1 files changed, 1 insertions, 0 deletions
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"
OpenPOWER on IntegriCloud