Daniel Jasper
497d9fdcf8
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
2014-08-15 05:00:35 +00:00
Daniel Jasper
a382cbe4eb
clang-format: [proto] Improve formatting of text-proto options.
...
Initial patch and tests by Kaushik Sridharan, thank you!
llvm-svn: 214084
2014-07-28 14:08:09 +00:00
Daniel Jasper
9c2820c4e3
clang-format: [proto] Add required space before absolute references.
...
llvm-svn: 211488
2014-06-23 07:36:25 +00:00
Nikola Smiljanic
e08a91ecd2
Enable alternative tokens by default for clang-format.
...
Patch by Bobby Moretti.
llvm-svn: 208269
2014-05-08 00:05:13 +00:00
Daniel Jasper
883ae9d9a3
clang-format: Don't bin-pack text-proto-formatted options.
...
Before:
repeated double value = 1
[(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA,
bbbbbbb: BBBB, bbbb: BBB}];
After:
repeated double value = 1
[(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA,
bbbbbbb: BBBB,
bbbb: BBB}];
llvm-svn: 207538
2014-04-29 15:54:14 +00:00
Chandler Carruth
1034666777
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
...
definition below all of the header #include lines, clang edition.
If you want more details about this, you can see some of the commits to
Debug.h in LLVM recently. This is just the clang section of a cleanup
I've done for all uses of DEBUG_TYPE in LLVM.
llvm-svn: 206849
2014-04-22 03:17:02 +00:00
Daniel Jasper
783bac6bba
clang-format: Understand proto text format without commas.
...
Also removed spaces before colons as they don't seem to be used
frequently.
Before:
optional int32 b = 2
[(foo_options) = {aaaaaaaaaaaaaaaaaaa : 123 bbbbbbbbbbbbbbbbbbbbbbbb :
"baz"}];
After:
optional int32 b = 2 [(foo_options) = {aaaaaaaaaaaaaaaaaaa: 123,
bbbbbbbbbbbbbbbbbbbbbbbb:"baz"}];
llvm-svn: 206269
2014-04-15 09:54:30 +00:00
Daniel Jasper
9d3adc06c6
x
...
llvm-svn: 206268
2014-04-15 09:54:24 +00:00
Daniel Jasper
220c0d1f5e
clang-format: Fix false positive in braced list detection in protos.
...
llvm-svn: 205954
2014-04-10 07:27:12 +00:00
Nico Weber
514ecc8ce8
clang-format: Let chromium style inherit google style's javascript tweaks.
...
llvm-svn: 200652
2014-02-02 20:50:45 +00:00
Daniel Jasper
f24301d79c
clang-format: More custom option fixes for protocol buffer files.
...
Before:
repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
aaaaaaaaaaaaaaaa : AAAAAAAAAA,
bbbbbbbbbbbbbbbb : BBBBBBBBBB
}];
After:
repeated double value = 1
[(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa : AAAAAAAAAA,
bbbbbbbbbbbbbbbb : BBBBBBBBBB}];
llvm-svn: 200406
2014-01-29 18:52:43 +00:00
Daniel Jasper
6e58feef76
clang-format: Fix formatting of custom proto options.
...
Before:
repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
aaaaaaaaaaaaaaaaa : AAAAAAAA
}];
After:
repeated double value = 1
[(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaaa : AAAAAAAA}];
llvm-svn: 200405
2014-01-29 18:43:40 +00:00
Daniel Jasper
a0e9be2bb2
clang-format: Fix option formatting in protocol buffer files.
...
Before:
optional int32 foo[ default = true, deprecated = true ];
After:
optional int32 foo[default = true, deprecated = true];
llvm-svn: 200327
2014-01-28 18:51:11 +00:00
Daniel Jasper
215d6c8c50
clang-format: Treat "." in protos like namespace separators.
...
Before:
optional really.really.long.and.qualified.type.aaaaaaa
.aaaaaaaa another_fiiiiiiiiiiiiiiiiiiiiield = 2;
After:
optional
really.really.long.and.qualified.type.aaaaaaa.aaaaaaaa
another_fiiiiiiiiiiiiiiiiiiiiield = 2;
llvm-svn: 199796
2014-01-22 08:04:52 +00:00
Daniel Jasper
929b1db276
clang-format: Properly format custom options in protocol buffer definitions.
...
Before:
option(my_option) = "abc";
After:
option (my_option) = "abc";
llvm-svn: 199672
2014-01-20 16:47:22 +00:00
Daniel Jasper
7052ce6d8b
clang-format: Better support and testing for protocol buffers.
...
With this patch, there is dedicated testing for protocol buffers
(https://developers.google.com/protocol-buffers/ ).
Also some minor tweaks formatting tweaks.
llvm-svn: 199580
2014-01-19 09:04:08 +00:00