summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-08-15 05:00:35 +0000
committerDaniel Jasper <djasper@google.com>2014-08-15 05:00:35 +0000
commit497d9fdcf8255d0d5b6164e06dac834510c55663 (patch)
tree10f7a145d8032134907f87b8081af8d12af7e231 /clang/unittests/Format
parente3981b8faca21fa3212177e2e41eb1aa5bc7da6b (diff)
downloadbcm5719-llvm-497d9fdcf8255d0d5b6164e06dac834510c55663.tar.gz
bcm5719-llvm-497d9fdcf8255d0d5b6164e06dac834510c55663.zip
clang-format: [proto] Understand text-format nesting without :
Before: option (MyProto.options) = { field_c : "OK" msg_field{field_d : 123} }; After: option (MyProto.options) = { field_c : "OK" msg_field{field_d : 123} }; (Note that the colon after "msg_field" is optional). llvm-svn: 215692
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r--clang/unittests/Format/FormatTestProto.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp
index 3ff38eab024..a56feedf80b 100644
--- a/clang/unittests/Format/FormatTestProto.cpp
+++ b/clang/unittests/Format/FormatTestProto.cpp
@@ -119,6 +119,11 @@ TEST_F(FormatTestProto, FormatsOptions) {
" field_c: \"OK\"\n"
" msg_field: {field_d: 123}\n"
"};");
+
+ verifyFormat("option (MyProto.options) = {\n"
+ " field_c: \"OK\"\n"
+ " msg_field{field_d: 123}\n"
+ "};");
}
TEST_F(FormatTestProto, FormatsService) {
OpenPOWER on IntegriCloud