History log of /llvm-project/clang/unittests/Format/FormatTestTextProto.cpp (Results 26 – 37 of 37)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b79987a9 15-Feb-2018 Krasimir Georgiev <krasimir@google.com>

[clang-format] Support repeated field lists in protos

Summary:
This patch adds support for list initialization of proto repeated fields:
```
keys: [1, 2, 3]
```

Reviewers: djasper

Reviewed By: dja

[clang-format] Support repeated field lists in protos

Summary:
This patch adds support for list initialization of proto repeated fields:
```
keys: [1, 2, 3]
```

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D43298

llvm-svn: 325252

show more ...


# 76064a4b 14-Feb-2018 Krasimir Georgiev <krasimir@google.com>

[clang-format] Recognize percents as format specifiers in protos

Summary:
Frequently, a percent in protos denotes a formatting specifier for string replacement.
Thus it is desirable to keep the perc

[clang-format] Recognize percents as format specifiers in protos

Summary:
Frequently, a percent in protos denotes a formatting specifier for string replacement.
Thus it is desirable to keep the percent together with what follows after it.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D43294

llvm-svn: 325159

show more ...


# 4e290648 13-Feb-2018 Krasimir Georgiev <krasimir@google.com>

[clang-format] Support text proto extensions

Summary:
This adds support for text proto extensions, like:
```
msg {
[type.type/ext] {
key: value
}
}
```

Reviewers: djasper

Reviewed By: djas

[clang-format] Support text proto extensions

Summary:
This adds support for text proto extensions, like:
```
msg {
[type.type/ext] {
key: value
}
}
```

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D43180

llvm-svn: 324995

show more ...


# c8b461b3 12-Feb-2018 Krasimir Georgiev <krasimir@google.com>

[clang-format] Fix comment indentation in text protos

Summary: This patch fixes a bug where the comment indent of comments in text protos gets messed up because by default paren states get created w

[clang-format] Fix comment indentation in text protos

Summary: This patch fixes a bug where the comment indent of comments in text protos gets messed up because by default paren states get created with AlignColons = true (which makes snese for ObjC).

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D43194

llvm-svn: 324896

show more ...


# 374e6de8 08-Feb-2018 Krasimir Georgiev <krasimir@google.com>

[clang-format] Do not break before long string literals in protos

Summary:
This patch is a follow-up to r323319 (which disables string literal breaking for
text protos) and it disables breaking befo

[clang-format] Do not break before long string literals in protos

Summary:
This patch is a follow-up to r323319 (which disables string literal breaking for
text protos) and it disables breaking before long string literals.

For example this:
```
keyyyyy: "long string literal"
```
used to get broken into:
```
keyyyyy:
"long string literal"
```

While at it, I also enabled it for LK_Proto and fixed a bug in the mustBreak code.

Reviewers: djasper, sammccall

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D42957

llvm-svn: 324591

show more ...


Revision tags: llvmorg-6.0.0-rc2
# a79d62d2 06-Feb-2018 Krasimir Georgiev <krasimir@google.com>

[clang-format] Adds space around angle brackets in text protos

Summary:
This patch adds spaces around angle brackets in text proto Google style.
Previously these were detected as template openers an

[clang-format] Adds space around angle brackets in text protos

Summary:
This patch adds spaces around angle brackets in text proto Google style.
Previously these were detected as template openers and closers, which happened
to have the expected effect. Now we detect them as scope openers and closers
similarly to the way braces are handled in this context.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D42727

llvm-svn: 324337

show more ...


# c2091808 31-Jan-2018 Krasimir Georgiev <krasimir@google.com>

[clang-format] Adds space around braces in text protos

Summary:
This patch modifies the text proto Google style to add spaces around braces.

I investigated using something different than Cpp11Brace

[clang-format] Adds space around braces in text protos

Summary:
This patch modifies the text proto Google style to add spaces around braces.

I investigated using something different than Cpp11BracedListStyle, but it turns out it's what we want and also the java and js styles also depend on that.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D42685

llvm-svn: 323860

show more ...


# 91700e07 25-Jan-2018 Krasimir Georgiev <krasimir@google.com>

[clang-format] Fixes indentation of inner text proto messages

Summary:
Consider the text proto:
```
message {
sub { key: value }
}
```
Previously the first `{` was TT_Unknown, which caused the inn

[clang-format] Fixes indentation of inner text proto messages

Summary:
Consider the text proto:
```
message {
sub { key: value }
}
```
Previously the first `{` was TT_Unknown, which caused the inner message to be
indented by the continuation width. This didn't happen for:
```
message {
sub: { key: value }
}
```
This is because the code to mark the first `{` as a TT_DictLiteral was only
considering the case where it marches forward and reaches a `:`.

This patch updates this by looking not only for `:`, but also for `<` and `{`.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D42500

llvm-svn: 323419

show more ...


# 55c23a10 23-Jan-2018 Krasimir Georgiev <krasimir@google.com>

[clang-format] Ignore UnbreakableTailLength sometimes during breaking

Summary:
This patch fixes an issue where the UnbreakableTailLength would be counted towards
the length of a token during breakin

[clang-format] Ignore UnbreakableTailLength sometimes during breaking

Summary:
This patch fixes an issue where the UnbreakableTailLength would be counted towards
the length of a token during breaking, even though we can break after the token.

For example, this proto text with column limit 20
```
# ColumnLimit: 20 V
foo: {
bar: {
bazoo: "aaaaaaa"
}
}
```
was broken:
```
# ColumnLimit: 20 V
foo: {
bar: {
bazoo:
"aaaaaaa"
}
}
```
because the 2 closing `}` were counted towards the string literal's `UnbreakableTailLength`.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D42376

llvm-svn: 323188

show more ...


Revision tags: llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2
# ddb19248 03-Aug-2017 Krasimir Georgiev <krasimir@google.com>

[clang-format] Fix indent of 'key <...>' and 'key {...}' in text protos

Summary:
This patch fixes the indentation of the code pattern `key <...>`and `key {...}` in text protos.
Previously, such line

[clang-format] Fix indent of 'key <...>' and 'key {...}' in text protos

Summary:
This patch fixes the indentation of the code pattern `key <...>`and `key {...}` in text protos.
Previously, such line would be alinged depending on the column of the previous
colon, which usually indents too much.

I'm gonna go ahead and commit this since it's a straightforward bugfix.

Reviewers: djasper, klimek

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D36143

llvm-svn: 309941

show more ...


Revision tags: llvmorg-5.0.0-rc1
# 47f21ef2 06-Jul-2017 Krasimir Georgiev <krasimir@google.com>

[clang-format] Add space between a message field key and the opening bracket in proto messages

Summary:
This patch updates the formatting of message fields of type `a{...}` to `a {...}`
for proto me

[clang-format] Add space between a message field key and the opening bracket in proto messages

Summary:
This patch updates the formatting of message fields of type `a{...}` to `a {...}`
for proto messages.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D35015

llvm-svn: 307261

show more ...


# 26b144cc 03-Jul-2017 Krasimir Georgiev <krasimir@google.com>

[clang-format] Support text proto messages

Summary: This patch adds support for textual protocol buffer messages.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek, mgorny

[clang-format] Support text proto messages

Summary: This patch adds support for textual protocol buffer messages.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek, mgorny

Differential Revision: https://reviews.llvm.org/D34441

llvm-svn: 307029

show more ...


12