#
e8a4939b |
| 22-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix incorrect trailing return arrow detection.
Before: auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa -> f()) {}
After: auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa->f
clang-format: Fix incorrect trailing return arrow detection.
Before: auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa -> f()) {}
After: auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa->f()) {}
llvm-svn: 220373
show more ...
|
#
f1f267b4 |
| 21-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [ObjC] Fix spacing in block variable parameters.
Before: { void (^block)(Object * x); }
After: { void (^block)(Object *x); }
llvm-svn: 220270
|
#
38efc131 |
| 21-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix space in direct destructor calls.
Before: void F(int& i) { i. ~int(); }
After: void F(int& i) { i.~int(); }
Also, some cleanups.
llvm-svn: 220269
|
#
8835a320 |
| 20-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix overloaded operator edge case.
Before: template <class F> void Call(F f) { f.template operator() <int>(); }
After: template <class F> void Call(F f) { f.template
clang-format: Fix overloaded operator edge case.
Before: template <class F> void Call(F f) { f.template operator() <int>(); }
After: template <class F> void Call(F f) { f.template operator()<int>(); }
llvm-svn: 220202
show more ...
|
#
78580792 |
| 20-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [ObjC] Fix using selector names as macro arguments.
Before: [self aaaaa:MACRO(a, b :, c :)];
After: [self aaaaa:MACRO(a, b:, c:)];
llvm-svn: 220197
|
#
86296e36 |
| 20-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix indentation of struct definitions with array init.
Before: struct { int x; int y; } points[] = { {1, 2}, {2, 3}, };
After: struct { int x; int y;
clang-format: Fix indentation of struct definitions with array init.
Before: struct { int x; int y; } points[] = { {1, 2}, {2, 3}, };
After: struct { int x; int y; } points[] = { {1, 2}, {2, 3}, };
llvm-svn: 220195
show more ...
|
#
da07a729 |
| 17-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Prefer breaking before trailing return arrows.
Before: auto SomeFunction( A aaaaaaaaaaaaaaaaaaaaa) const -> decltype(f(aaaaaaaaaaaaaaaaaaaaa)) {}
After: auto SomeFunction(A
clang-format: Prefer breaking before trailing return arrows.
Before: auto SomeFunction( A aaaaaaaaaaaaaaaaaaaaa) const -> decltype(f(aaaaaaaaaaaaaaaaaaaaa)) {}
After: auto SomeFunction(A aaaaaaaaaaaaaaaaaaaaa) const -> decltype(f(aaaaaaaaaaaaaaaaaaaaa)) {}
llvm-svn: 220043
show more ...
|
#
1a31bab3 |
| 16-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix behavior with comments before conditional expressions
Before: SomeFunction(aaaaaaaaaaaaaaaaa, // comment. ccccccccccccccccc ? aaaaaaaaaaaaaaaaaa
clang-format: Fix behavior with comments before conditional expressions
Before: SomeFunction(aaaaaaaaaaaaaaaaa, // comment. ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb);
After: SomeFunction(aaaaaaaaaaaaaaaaa, // comment. ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb);
llvm-svn: 219921
show more ...
|
#
ea772b4d |
| 16-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [ObjC] Fix method expression detection.
Before: return (a)[foo bar : baz];
After: return (a)[foo bar:baz];
llvm-svn: 219919
|
#
ec8e838b |
| 11-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [ObjC] Wrap ObjC method declarations before annotations.
Before: - (instancetype)initXxxxxxxxxxxxxxxxxxxxxxxxx:(id<x>)x y:(id<yyyyyyyyyy
clang-format: [ObjC] Wrap ObjC method declarations before annotations.
Before: - (instancetype)initXxxxxxxxxxxxxxxxxxxxxxxxx:(id<x>)x y:(id<yyyyyyyyyyyyyyyyyyyy>) y NS_DESIGNATED_INITIALIZER; After: - (instancetype)initXxxxxxxxxxxxxxxxxxxxxxxxx:(id<x>)x y:(id<yyyyyyyyyyyyyyyyyyyy>)y NS_DESIGNATED_INITIALIZER;
llvm-svn: 219564
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
|
#
4281c5ae |
| 07-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix bug with comments between non-trival parameters.
Before: SomeFunction(a, a, // comment b + x);
After: SomeFunction(a, a, //
clang-format: Fix bug with comments between non-trival parameters.
Before: SomeFunction(a, a, // comment b + x);
After: SomeFunction(a, a, // comment b + x);
llvm-svn: 219209
show more ...
|
#
a45eb4c0 |
| 06-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: If in doubt, assume '+' is a binary operator.
Before: #define LENGTH(x, y) (x) - (y)+1
After: #define LENGTH(x, y) (x) - (y) + 1
llvm-svn: 219119
|
#
91881d99 |
| 29-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix GCC warning about implicit bool pointer conversion.
Introduced in r217880.
llvm-svn: 218597
|
#
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 ...
|
#
540dbe29 |
| 19-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Prevent column layout if elements aren't uniform enough.
This patch only considers the difference between the length of the shortest and longest element, but we might want to look at o
clang-format: Prevent column layout if elements aren't uniform enough.
This patch only considers the difference between the length of the shortest and longest element, but we might want to look at other features (token count, etc.) in future.
Before: std::vector<MyValues> aaaaaaaaaaaaaaaaaaa{ aaaaaaa, aaaaaaaaaa, aaaaa, aaaaaaaaaaaaaaa, aaa, aaaaaaaaaa, a, aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaa, aaaaaaa, a};
After: std::vector<MyValues> aaaaaaaaaaaaaaaaaaa{ aaaaaaa, aaaaaaaaaa, aaaaa, aaaaaaaaaaaaaaa, aaa, aaaaaaaaaa, a, aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaa, aaaaaaa, a};
llvm-svn: 218111
show more ...
|
#
a41aa536 |
| 19-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Undo r216377.
It has proven to not be a food idea in many case.
llvm-svn: 218107
|
#
b23e20b7 |
| 16-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Allow unbroken ::: in inline assembly.
Before: asm volatile("nop" :: : "memory");
After: asm volatile("nop" ::: "memory");
Patch by Eugene Toder. Thank you.
llvm-svn: 217883
|
#
0085300a |
| 16-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Restructure and add missing tests.
Patch by Jean-Philippe Dufraigne, Thank you!
llvm-svn: 217880
|
#
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
|
#
d6f17d83 |
| 12-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve line breaks at function calls.
Before: EXPECT_CALL(SomeObject, SomeFunction(Parameter)).Times(2).WillRepeatedly( Return(SomeValue));
After: EXPECT_CALL(SomeObject, S
clang-format: Improve line breaks at function calls.
Before: EXPECT_CALL(SomeObject, SomeFunction(Parameter)).Times(2).WillRepeatedly( Return(SomeValue));
After: EXPECT_CALL(SomeObject, SomeFunction(Parameter)) .Times(2) .WillRepeatedly(Return(SomeValue));
llvm-svn: 217687
show more ...
|
#
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 ...
|
#
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 ...
|
Revision tags: llvmorg-3.5.0 |
|
#
73e171f7 |
| 29-Aug-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix unary operator detection in corner case.
Before: decltype(* ::std::declval<const T &>()) void F();
After: decltype(*::std::declval<const T &>()) void F();
llvm-svn: 216724
|