diff options
author | Daniel Jasper <djasper@google.com> | 2014-08-15 05:00:35 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-08-15 05:00:35 +0000 |
commit | 497d9fdcf8255d0d5b6164e06dac834510c55663 (patch) | |
tree | 10f7a145d8032134907f87b8081af8d12af7e231 /clang/unittests/Format | |
parent | e3981b8faca21fa3212177e2e41eb1aa5bc7da6b (diff) | |
download | bcm5719-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.cpp | 5 |
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) { |