#
d081e88e |
| 21-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Handle comments in short case labels.
With AllowShortCaseLabelsOnASingleLine set to true: This gets now left unchanged: case 1: // comment return;
Whereas before it was chan
clang-format: Handle comments in short case labels.
With AllowShortCaseLabelsOnASingleLine set to true: This gets now left unchanged: case 1: // comment return;
Whereas before it was changed into: case 1: // comment return;
This fixes llvm.org/PR21630.
llvm-svn: 222529
show more ...
|
#
fe2cf667 |
| 19-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [Java] Ignore C++-specific keywords
Before: public void union (Object o); public void struct (Object o); public void delete (Object o);
After: public void union(Object o);
clang-format: [Java] Ignore C++-specific keywords
Before: public void union (Object o); public void struct (Object o); public void delete (Object o);
After: public void union(Object o); public void struct(Object o); public void delete(Object o);
Patch by Harry Terkelsen, thank you!
llvm-svn: 222357
show more ...
|
#
3aa9a6a1 |
| 18-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Add option to disable alignment after opening brackets
Before: SomeFunction(parameter, parameter);
After: SomeFunction(parameter, parameter);
Patch by Harry
clang-format: Add option to disable alignment after opening brackets
Before: SomeFunction(parameter, parameter);
After: SomeFunction(parameter, parameter);
Patch by Harry Terkelsen, thank you!
llvm-svn: 222284
show more ...
|
#
30a2406e |
| 14-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [Java] No altnerative operator names in Java.
Before: someObject.and ();
After: someObject.and();
llvm-svn: 221978
|
#
61d81973 |
| 14-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [Java] Improve formatting of generics.
Before: Function < F, ? extends T > function;
After: Function<F, ? extends T> function;
llvm-svn: 221976
|
#
34272657 |
| 13-Nov-2014 |
Nico Weber <nicolasweber@gmx.de> |
clang-format: Format extern "C" blocks like namespace blocks.
namespace blocks act as if KeepEmptyLinesAtTheStartOfBlocks is always true, and aren't collapsed to a single line even if they would fit
clang-format: Format extern "C" blocks like namespace blocks.
namespace blocks act as if KeepEmptyLinesAtTheStartOfBlocks is always true, and aren't collapsed to a single line even if they would fit. Do the same for extern "C" blocks.
Before,
extern "C" {
void ExternCFunction();
}
was collapsed into `extern "C" { void ExternCFunction(); }`. Now it stays like it was.
Fixes http://crbug.com/432640 and part of PR21419.
llvm-svn: 221897
show more ...
|
#
e551bb70 |
| 05-Nov-2014 |
Daniel Jasper <djasper@google.com> |
Revert "clang-format: [js] Updates to Google's JavaScript style."
This reverts commit eefd2eaad43c5c2b17953ae7ed1e72b28e696f7b.
Apparently, this change was a bit premature.
llvm-svn: 221365
|
#
d0ec0d62 |
| 04-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Use identifier table for keywords in other languages.
Slightly easier to write, more efficient and prevents bugs by misspelling them.
No functional changes intended.
llvm-svn: 221259
|
#
f739b0db |
| 31-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [js] Updates to Google's JavaScript style.
The style guide is changing..
llvm-svn: 220977
|
#
ac29eacc |
| 29-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Format line if invoked on the trailing newline.
llvm-svn: 220883
|
#
49a9a283 |
| 29-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support more regex literals.
Previously a regex-literal containing "/*" would through clang-format off, e.g.: var regex = /\/*$/;
Would lead to none of the following code to be
clang-format: [JS] Support more regex literals.
Previously a regex-literal containing "/*" would through clang-format off, e.g.: var regex = /\/*$/;
Would lead to none of the following code to be formatted.
llvm-svn: 220860
show more ...
|
#
50d634b3 |
| 28-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [ObjC] Add separate flag to control indentation in blocks
Apparently, people are very much divided on what the "correct" indentation is. So, best to give them a choice.
The new flag i
clang-format: [ObjC] Add separate flag to control indentation in blocks
Apparently, people are very much divided on what the "correct" indentation is. So, best to give them a choice.
The new flag is called ObjCBlockIndentWidth and the default is now set to the same value as IndentWidth for the pre-defined styles.
llvm-svn: 220784
show more ...
|
#
b89fbe60 |
| 28-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Don't put functions on a single line in Google's Java style.
llvm-svn: 220778
|
#
56346193 |
| 27-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix bad merging of lines in nested blocks.
Before: SomeFunction([]() { #define A a return 43; });
After: SomeFunction([]() { #define A a return 43; });
llvm-svn: 22
clang-format: Fix bad merging of lines in nested blocks.
Before: SomeFunction([]() { #define A a return 43; });
After: SomeFunction([]() { #define A a return 43; });
llvm-svn: 220684
show more ...
|
#
18210d7d |
| 09-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Add option to control call argument bin-packing separately
This is desirable for the Chromium style guide: http://www.chromium.org/developers/coding-style
llvm-svn: 219400
|
#
d0eed3a0 |
| 03-Oct-2014 |
Benjamin Kramer <benny.kra@googlemail.com> |
Format: ArrayRefize some implicit copies away.
NFC.
llvm-svn: 219000
|
#
67f8ad25 |
| 30-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support AllowShortFunctionsOnASingleLine.
Specifically, this also counts for stuff like (with style "inline"): var x = function() { return 1; };
llvm-svn: 218689
|
#
7533b4da |
| 24-Sep-2014 |
Nico Weber <nicolasweber@gmx.de> |
clang-format: Don't let -style=Chromium imply c++03 template formatting.
Chromium's now using some c++11 language features, so it's now fine that clang-format produces vector<vector<int>>.
llvm-svn
clang-format: Don't let -style=Chromium imply c++03 template formatting.
Chromium's now using some c++11 language features, so it's now fine that clang-format produces vector<vector<int>>.
llvm-svn: 218392
show more ...
|
#
c58c70e2 |
| 15-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Basic support for Java.
llvm-svn: 217759
|
#
ac043c90 |
| 15-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Add option to break before non-assignment operators.
This will allow: int aaaaaaaaaaaaaa = bbbbbbbbbbbbbb + ccccccccccccccc;
llvm-svn: 217757
|
#
650ecb53 |
| 11-Sep-2014 |
Roman Kashitsyn <romankashicin@gmail.com> |
Fix bug 20892 - clang-format does not handle C-style comments
Summary: http://llvm.org/bugs/show_bug.cgi?id=20892
Add support of C-style formatting enabling/disabling directives. Now the following
Fix bug 20892 - clang-format does not handle C-style comments
Summary: http://llvm.org/bugs/show_bug.cgi?id=20892
Add support of C-style formatting enabling/disabling directives. Now the following two styles are supported:
// clang-format on /* clang-format on */
The flexibility in comments (support of extra spaces and/or slashes, etc.) is deliberately avoided to simplify search in large code bases.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits, curdeius, klimek
Differential Revision: http://reviews.llvm.org/D5309
llvm-svn: 217588
show more ...
|
#
b87899b5 |
| 10-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Add option to allow short case labels on a single line.
On a single line: switch (a) { case 1: x = 1; return; case 2: x = 2; return; default: break; }
Not on a single line:
clang-format: Add option to allow short case labels on a single line.
On a single line: switch (a) { case 1: x = 1; return; case 2: x = 2; return; default: break; }
Not on a single line: switch (a) { case 1: x = 1; return; case 2: x = 2; return; default: break; }
This partly addresses llvm.org/PR16535. In the long run, we probably want to lay these out in columns.
llvm-svn: 217501
show more ...
|
#
23376259 |
| 09-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support regex literals with trailing escaped slash.
Before: var regex = / a\//; int i;
After: var regex = /a\//; int i;
This required pushing the Lexer into its wrapper cl
clang-format: [JS] Support regex literals with trailing escaped slash.
Before: var regex = / a\//; int i;
After: var regex = /a\//; int i;
This required pushing the Lexer into its wrapper class and generating a new one in this specific case. Otherwise, the sequence get lexed as a //-comment. This is hacky, but I don't know a better way (short of supporting regex literals in the Lexer).
Pushing the Lexer down seems to make all the call sites simpler.
llvm-svn: 217444
show more ...
|
#
4db69bd5 |
| 04-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support alternative operator names as identifiers.
Before: not. and . or . not_eq = 1;
After: not.and.or.not_eq = 1;
llvm-svn: 217179
|
#
db986eb6 |
| 03-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Add an option 'SpaceAfterCStyleCast'.
This permits to add a space after closing parenthesis of a C-style cast. Defaults to false to preserve old behavior.
Fixes llvm.org/PR19982.
Bef
clang-format: Add an option 'SpaceAfterCStyleCast'.
This permits to add a space after closing parenthesis of a C-style cast. Defaults to false to preserve old behavior.
Fixes llvm.org/PR19982.
Before: (int)i;
After: (int) i;
Patch by Marek Kurdej.
llvm-svn: 217022
show more ...
|