History log of /llvm-project/clang/unittests/Format/FormatTestProto.cpp (Results 26 – 50 of 68)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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 ...


# 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 ...


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 ...


# fa4dbb68 03-Aug-2017 Krasimir Georgiev <krasimir@google.com>

[clang-format] Fix parsing of <>-style proto options

Summary:
This patch fixes the parsing of proto option fields like `option op = <...>`.
Previously the parser did not enter the right code path in

[clang-format] Fix parsing of <>-style proto options

Summary:
This patch fixes the parsing of proto option fields like `option op = <...>`.
Previously the parser did not enter the right code path inside the angle braces,
causing the contents to be split into several unwrapped lines inside.

I'll just go ahead and commit this since it's a straightforward bugfix.

Reviewers: djasper, klimek

Subscribers: cfe-commits

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

llvm-svn: 309937

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 ...


# feeba610 29-Jun-2017 Krasimir Georgiev <krasimir@google.com>

[clang-format] Fix parsing of msg{field}-style proto options

Summary:
This patch makes the `{` in `msg_field{field: OK}` in a proto option scope be
treated as an assignment operator. Previosly the a

[clang-format] Fix parsing of msg{field}-style proto options

Summary:
This patch makes the `{` in `msg_field{field: OK}` in a proto option scope be
treated as an assignment operator. Previosly the added test case was formatted
as:
```
option (MyProto.options) = {
field_a: OK
field_b{field_c: OK} field_d: OKOKOK field_e: OK
}
```

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 306672

show more ...


# ff747be4 27-Jun-2017 Krasimir Georgiev <krasimir@google.com>

[clang-format] Support <>-style proto message fields

Summary:
This patch adds support for <>-style proto message fields inside proto options.
Previously these were wrongly treated as binary operator

[clang-format] Support <>-style proto message fields

Summary:
This patch adds support for <>-style proto message fields inside proto options.
Previously these were wrongly treated as binary operators and as such were
working only by chance for a limited number of cases.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 306406

show more ...


# 9451e671 27-Jun-2017 Krasimir Georgiev <krasimir@google.com>

[clang-format] Add a test for associative map proto buffer fields

Summary:
The test suite was missing a test about associative maps:
https://developers.google.com/protocol-buffers/docs/proto3#maps

[clang-format] Add a test for associative map proto buffer fields

Summary:
The test suite was missing a test about associative maps:
https://developers.google.com/protocol-buffers/docs/proto3#maps

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 306386

show more ...


Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1
# c79e4d2d 14-Mar-2017 Daniel Jasper <djasper@google.com>

clang-format: Make it very slighly more expensive to wrap between "= {".

This prevents unwanted fallout from r296664. Specifically in proto formatting,
this changed:
optional Aaaaaaaa aaaaaaaa = 1

clang-format: Make it very slighly more expensive to wrap between "= {".

This prevents unwanted fallout from r296664. Specifically in proto formatting,
this changed:
optional Aaaaaaaa aaaaaaaa = 12 [
(aaa) = aaaa,
(bbbbbbbbbbbbbbbbbbbbbbbbbb) = {
aaaaaaaaaaaaaaaaa: true,
aaaaaaaaaaaaaaaa: true
}
];

Into:
optional Aaaaaaaa aaaaaaaa = 12 [
(aaa) = aaaa,
(bbbbbbbbbbbbbbbbbbbbbbbbbb) =
{aaaaaaaaaaaaaaaaa: true, aaaaaaaaaaaaaaaa: true}
];

Which is considered less readable. Generally, it seems preferable to
format such dict literals as blocks rather than contract them to one
line.

llvm-svn: 297696

show more ...


Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2
# da910e0a 03-Feb-2017 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Also supports implicit string literal concatenation

llvm-svn: 293995


Revision tags: llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1
# 4f8d9943 11-Jul-2016 Eric Liu <ioeric@google.com>

Make tooling::applyAllReplacements return llvm::Expected<string> instead of empty string to indicate potential error.

Summary:
return llvm::Expected<> to carry error status and error information.
Th

Make tooling::applyAllReplacements return llvm::Expected<string> instead of empty string to indicate potential error.

Summary:
return llvm::Expected<> to carry error status and error information.
This is the first step towards introducing "Error" into tooling::Replacements.

Reviewers: djasper, klimek

Subscribers: ioeric, klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D21601

llvm-svn: 275062

show more ...


# 7f3b99fc 23-Jun-2016 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Use more compact format for text-formatted options

Before:
enum Type {
UNKNOWN = 0 [(some_options) = {
a: aa,
b: bb
}];
};

After:
enum Type {
UNK

clang-format: [Proto] Use more compact format for text-formatted options

Before:
enum Type {
UNKNOWN = 0 [(some_options) = {
a: aa,
b: bb
}];
};

After:
enum Type {
UNKNOWN = 0 [(some_options) = {a: aa, b: bb}];
};

llvm-svn: 273553

show more ...


# 8b61d14d 20-Jun-2016 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Fix "import public" after r273179.

llvm-svn: 273196


# 3d5a7d6b 20-Jun-2016 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Don't do bad things if imports are missing ;.

llvm-svn: 273179


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1, llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1
# ffbad0e8 04-Jan-2016 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Basic support for options with <> for repeated fields.

llvm-svn: 256737


# ccff4d1e 04-Jan-2016 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Improve wrapping of message field attributes.

Before:
optional AAA aaa = 1 [foo =
{
key: "a" //
},
bar = {
key: "a" //
}];

After:
optio

clang-format: [Proto] Improve wrapping of message field attributes.

Before:
optional AAA aaa = 1 [foo =
{
key: "a" //
},
bar = {
key: "a" //
}];

After:
optional AAA aaa = 1 [
foo = {
key: "a" //
},
bar = {
key: "a" //
}
];

llvm-svn: 256736

show more ...


Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2
# d8d9839a 20-Nov-2015 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Support extending message.

Before:
extend.foo.Bar {
}

After:
extend .foo.Bar {
}

llvm-svn: 253667


Revision tags: llvmorg-3.7.1-rc1, llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1
# c6dd273a 16-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Handle enum bodies differently.

In proto, enum constants can contain complex options and should be
handled more like individual declarations.

Before:
enum Type {
UNKNOWN

clang-format: [Proto] Handle enum bodies differently.

In proto, enum constants can contain complex options and should be
handled more like individual declarations.

Before:
enum Type {
UNKNOWN = 0 [(some_options) =
{
a: aa,
b: bb
}];
};

After:
enum Type {
UNKNOWN = 0 [(some_options) = {
a: aa,
b: bb
}];
};

llvm-svn: 242404

show more ...


# 23d3bcfe 25-Jun-2015 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Don't treat "operator" as keyword.

Before:
optional string operator= 1;

After:
optional string operator = 1;

llvm-svn: 240624


Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1
# ab9db510 22-Jun-2015 Alexander Kornienko <alexfh@google.com>

Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").

llvm-svn: 240353


# 3d9d929e 22-Jun-2015 Alexander Kornienko <alexfh@google.com>

Fixed/added namespace ending comments using clang-tidy. NFC

The patch is generated using this command:

$ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
-checks=-*,llvm-namespace-comme

Fixed/added namespace ending comments using clang-tidy. NFC

The patch is generated using this command:

$ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
-checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
work/llvm/tools/clang

To reduce churn, not touching namespaces spanning less than 10 lines.

llvm-svn: 240270

show more ...


Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1
# 1b998815 23-Apr-2015 Daniel Jasper <djasper@google.com>

clang-format: [Proto] Don't linewrap top-level options.

They are very similar to import statements.

llvm-svn: 235582


123