| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
Before:
new int {1};
After:
new int{1};
llvm-svn: 208168
|
|
|
|
|
|
|
|
|
|
| |
Before:
var x = /** @type {foo} */ (bar);
After:
var x = /** @type {foo} */(bar);
llvm-svn: 208093
|
|
|
|
| |
llvm-svn: 208090
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
goog.scope(function() {
var x = a.b;
var y = c.d;
}); // goog.scope
After:
goog.scope(function() {
var x = a.b;
var y = c.d;
}); // goog.scope
llvm-svn: 208088
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
(void) SimplifyICmpOperands(Cond, LHS, RHS);
After:
(void)SimplifyICmpOperands(Cond, LHS, RHS);
Differential Revision: http://reviews.llvm.org/D3615
llvm-svn: 208080
|
|
|
|
|
|
|
|
| |
This is to remove FIXME added in r207964.
Differential Revision: http://reviews.llvm.org/D3619
llvm-svn: 208071
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
decltype(long_name_forcing_break)
f() {}
After:
decltype(long_name_forcing_break)
f() {}
llvm-svn: 207965
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void f() { my_int a = (my_int) * b; }
void f() { return P ? (my_int) * P : (my_int)0; }
After:
void f() { my_int a = (my_int)*b; }
void f() { return P ? (my_int)*P : (my_int)0; }
Differential Revision: http://reviews.llvm.org/D3576
llvm-svn: 207964
|
|
|
|
|
|
|
|
|
|
| |
Before:
SomeFunction([](decltype(x), A * a) {});
After:
SomeFunction([](decltype(x), A *a) {});
llvm-svn: 207961
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
#ifdef _DEBUG
int foo( int i = 0 )
#else
int foo( int i = 5 )
#endif { return i; }
After:
#ifdef _DEBUG
int foo( int i = 0 )
#else
int foo( int i = 5 )
#endif
{
return i;
}
llvm-svn: 207958
|
|
|
|
|
|
| |
These used to interact badly with AlwaysBreakBeforeMultilineStrings.
llvm-svn: 207955
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@interface BSApplicationController () {
@private
id _extraIvar;
}
@end
After:
@interface BSApplicationController ()
{
@private
id _extraIvar;
}
@end
llvm-svn: 207849
|
|
|
|
| |
llvm-svn: 207775
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
repeated double value = 1
[(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA,
bbbbbbb: BBBB, bbbb: BBB}];
After:
repeated double value = 1
[(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA,
bbbbbbb: BBBB,
bbbb: BBB}];
llvm-svn: 207538
|
|
|
|
| |
llvm-svn: 207533
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void f() {
return; }
After:
void f() { return; }
llvm-svn: 207527
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
*(int *)(p &~3UL) = 0;
After:
*(int *)(p & ~3UL) = 0;
This fixes llvm.org/PR19464.
llvm-svn: 207405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes llvm.org/PR19482.
Before:
switch (a) {
case(B) :
return;
}
After:
switch (a) {
case (B):
return;
}
llvm-svn: 207402
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes llvm.org/PR19450.
Before:
@interface
BookmarkHomeHandsetViewController ()<BookmarkAllCollectionViewDelegate,
BookmarkFolderCollectionViewDelegate,
BookmarkMenuViewControllerDelegate,
BookmarkSearchViewControllerDelegate> {
}
After:
@interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()<
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> {
}
llvm-svn: 207400
|
|
|
|
|
|
|
| |
Previously this could lead to a column limit violation with the
required escaped newlines.
llvm-svn: 207351
|
|
|
|
|
|
|
|
|
|
| |
definition below all of the header #include lines, clang edition.
If you want more details about this, you can see some of the commits to
Debug.h in LLVM recently. This is just the clang section of a cleanup
I've done for all uses of DEBUG_TYPE in LLVM.
llvm-svn: 206849
|
|
|
|
|
|
| |
DEBUG_TYPE to do so. LLVM's Debug.h requires this as of r206822.
llvm-svn: 206823
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch ensures that the lines of the block comments retain relative
column offsets. In order to do this WhitespaceManager::Changes representing
continuation of block comments keep a pointer on the change representing the
whitespace change before the block comment, and a relative column offset to this
change, so that the correct column can be reconstructed at the end of alignment
process.
Fixes http://llvm.org/PR19325
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D3408
llvm-svn: 206472
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With BinPackParameters=false and Cpp11BracedListStyle=true (i.e. mostly
for Chromium):
Before:
const Aaaaaa aaaaa = {aaaaa, bbbbb, ccccc, ddddd, eeeee, ffffff,
ggggg, hhhhhh, iiiiii, jjjjjj, kkkkkk};
After:
const Aaaaaa aaaaa = {aaaaa,
bbbbb,
ccccc,
ddddd,
eeeee,
ffffff,
ggggg,
hhhhhh,
iiiiii,
jjjjjj,
kkkkkk};
This fixes llvm.org/PR19359. I am not sure we'll want this in all cases
in the long run, but I'll guess we'll get feedback on that.
llvm-svn: 206458
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to how we treat assignments and seems to be generally
desirable.
Before:
llvm::errs() << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaaaaaa);
After:
llvm::errs() << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaa);
llvm-svn: 206384
|
|
|
|
| |
llvm-svn: 206339
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Fixes http://llvm.org/PR19368
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D3379
llvm-svn: 206295
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also removed spaces before colons as they don't seem to be used
frequently.
Before:
optional int32 b = 2
[(foo_options) = {aaaaaaaaaaaaaaaaaaa : 123 bbbbbbbbbbbbbbbbbbbbbbbb :
"baz"}];
After:
optional int32 b = 2 [(foo_options) = {aaaaaaaaaaaaaaaaaaa: 123,
bbbbbbbbbbbbbbbbbbbbbbbb:"baz"}];
llvm-svn: 206269
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int bi{1 '000' 000};
After:
int bi{1'000'000};
This fixes llvm.org/PR19342.
llvm-svn: 206263
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, for a nested block or lambda, don't try to put the single
statement body inline, if it exceeds the column limit.
This should not change any observable behavior (as those would never
have led to the 'best' solution), but significantly speeds up formatting
time.
This fixes llvm.org/PR18761. Formatting time goes down from ~100s to a
few ms.
llvm-svn: 206260
|
|
|
|
|
|
|
| |
This somewhat improves the performance problem reported in
llvm.org/PR18761. No other behavior changes intended.
llvm-svn: 206258
|
|
|
|
| |
llvm-svn: 206173
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
#define A(a, b) (a &&b)
After:
#define A(a, b) (a && b)
This fixes llvm.org/PR19343.
llvm-svn: 206165
|
|
|
|
|
|
|
| |
Instead of choosing based on the number of elements, simply respect the
user's choice of where to wrap array literals.
llvm-svn: 206162
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
NSArray* a = [[NSArray alloc] initWithArray:@[
@"a"
]
copyItems:YES];
After:
NSArray* a = [[NSArray alloc] initWithArray:@[ @"a" ]
copyItems:YES];
This fixed llvm.org/PR19080.
llvm-svn: 206161
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
if (aaaaaaaa && bbbbbbbbbbbbbbb // need to wrap
== cccccccccccccc) ...
After:
if (aaaaaaaa
&& bbbbbbbbbbbbbbb // need to wrap
== cccccccccccccc) ...
The same rule has already be implemented for BreakBeforeBinaryOperators
set to false in r205527.
llvm-svn: 206159
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now correctly formats:
{
int a;
void f() {
callme(some(parameter1,
<<<<<<< text by the vcs
parameter2),
||||||| text by the vcs
parameter2),
parameter3,
======= text by the vcs
parameter2, parameter3),
>>>>>>> text by the vcs
otherparameter);
}
}
llvm-svn: 206157
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(
aaaaaaaaaaaa) = aaaaaaaa::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
After:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(aaaaaaaaaaaa) =
aaaaaaaa::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
llvm-svn: 206155
|
|
|
|
|
|
|
| |
We will need this to correctly handle conflict markers inside macro
definitions.
llvm-svn: 206029
|
|
|
|
| |
llvm-svn: 205954
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
static StructInitInfo module = {MODULE_BUILTIN, /* type */
"streams" /* name */
};
After:
static StructInitInfo module = {
MODULE_BUILTIN, /* type */
"streams" /* name */
};
This fixes llvm.org/PR19378.
llvm-svn: 205851
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before, it would turn:
SomeFunction([]() { // Cool function..
return 43;
});
Into this:
SomeFunction([]() { // Cool function.. return 43; });
llvm-svn: 205849
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
SomeFunction([]() {
int i = 42;
return i;
},
[]() {
int j = 43;
return j;
});
After:
SomeFunction([]() {
int i = 42;
return i;
},
[]() {
int j = 43;
return j;
});
llvm-svn: 205848
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void aaaaaaaaaaaaaa(aaaaaaaa aaa) override AAAAAAAAAAAAAAAAAAAAAAAA(
aaaaaaaaaaaaaaa);
After:
void aaaaaaaaaaaaaa(aaaaaaaa aaa) override
AAAAAAAAAAAAAAAAAAAAAAAA(aaaaaaaaaaaaaaa);
llvm-svn: 205846
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More precisely keep all short annotations (<10 characters) on the same
line if possible. Previously, clang-format would only prefer to do so
for "const", "override" and "final". However, it seems to be generally
preferable, especially because some codebases have to wrap those in
macros for backwards compatibility.
Before:
void someLongFunction(int someLongParameter)
OVERRIDE {}
After:
void someLongFunction(
int someLongParameter) OVERRIDE {}
This fixes llvm.org/PR19363.
llvm-svn: 205845
|
|
|
|
|
|
|
| |
Previously, this did not look through trailing comments leading to a few
formatting oddities.
llvm-svn: 205843
|
|
|
|
| |
llvm-svn: 205763
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
A<int * []> a;
After:
A<int *[]> a;
This fixes llvm.org/PR19360.
llvm-svn: 205761
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before AllowShortFunctionsOnASingleLine could either be true, merging
all functions, or false, merging no functions. This patch adds a third
value "Inline", which can be used to only merge short functions defined
inline in a class, i.e.:
void f() {
return 42;
}
class C {
void f() { return 42; }
};
llvm-svn: 205760
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
switch (a) {
case 1: { return 'a'; }
}
After:
switch (a) {
case 1: {
return 'a';
}
}
llvm-svn: 205611
|