This patch adds support for textual protocol buffer messages.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Tests for <>-style message fields are missing because I discovered that they don't really work in a multiline setting in proto options anyways. I'll address this problem separately.
Comment Actions
- Add initial support for <>-style message fields
- Added single-line tests
- Added multiline message proto tests
lib/Format/ContinuationIndenter.cpp | ||
---|---|---|
71 ↗ | (On Diff #104646) | Maybe rename to opensProtoMessageField() and add: if (!LessTok.is(tok::less)) return false; |
107 ↗ | (On Diff #104646) | Do we need to set this explicitly here? Is it not enough to set FormatStyle.BinPackParameters to false? |
lib/Format/TokenAnnotator.cpp | ||
657 ↗ | (On Diff #104646) | Missing space... |
lib/Format/UnwrappedLineParser.cpp | ||
1360 ↗ | (On Diff #104646) | Why not just call nextToken before calling this function instead of adding the "StartInside" parameter? |
Comment Actions
- Address review comments
lib/Format/ContinuationIndenter.cpp | ||
---|---|---|
107 ↗ | (On Diff #104646) | BinPackParameters doesn't work at global scope. We set these explicitly to deal with the message formatting at global scope. |
lib/Format/TokenAnnotator.cpp | ||
657 ↗ | (On Diff #104646) | I don't understand? This has been formatted with clang-format. |