diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-02-19 16:00:21 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-02-19 16:00:21 +0000 |
commit | 9c5ac63785b5aac0c85b57637409869b27983bfe (patch) | |
tree | c05cdffbc7d6328f3a14b25ea88be685e776ef24 /clang/unittests/Format/FormatTestTextProto.cpp | |
parent | 7f0f8bb4bd0581ed28f99254b6cebcfa61913121 (diff) | |
download | bcm5719-llvm-9c5ac63785b5aac0c85b57637409869b27983bfe.tar.gz bcm5719-llvm-9c5ac63785b5aac0c85b57637409869b27983bfe.zip |
[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
Diffstat (limited to 'clang/unittests/Format/FormatTestTextProto.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestTextProto.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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) { |