| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
abstract class SomeClass extends SomeOtherClass implements
SomeInterface {}
After:
abstract class SomeClass extends SomeOtherClass
implements SomeInterface {}
llvm-svn: 221103
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@SomeAnnotation("With some really looooooooooooooong text") private static final
long something = 0L;
void SomeFunction(@Nullable
String something) {}
After:
@SomeAnnotation("With some really looooooooooooooong text")
private static final long something = 0L;
void SomeFunction(@Nullable String something) {}
llvm-svn: 220984
|
|
|
|
|
|
| |
The style guide is changing..
llvm-svn: 220977
|
|
|
|
| |
llvm-svn: 220883
|
|
|
|
|
|
|
|
|
|
| |
This moves classes for storing and applying replacements to separate
files. These classes specifically are used by clang-format which doesn't
have any other dependencies on clangAST. Thereby, the size of
clang-format's binary can be cut roughly in half and its build time sped
up.
llvm-svn: 220867
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
template <class T,
class = typename ::std::enable_if<
::std::is_array<T>{}&& ::std::is_array<T>{}>::type>
void F();
After:
template <class T,
class = typename ::std::enable_if<
::std::is_array<T>{} && ::std::is_array<T>{}>::type>
void F();
llvm-svn: 220813
|
|
|
|
| |
llvm-svn: 220807
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
template <class T, class = typename std::enable_if<std::is_integral<
T>::value &&(sizeof(T) > 1 || sizeof(T) < 8)>::type>
void F();
After:
template <class T, class = typename std::enable_if<
std::is_integral<T>::value &&
(sizeof(T) > 1 || sizeof(T) < 8)>::type>
void F();
llvm-svn: 220805
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
ReturnType MACRO
FunctionName() {}
After:
ReturnType MACRO
FunctionName() {}
This fixes llvm.org/PR21404.
I wonder what the motivation for that if-condition was. But as no test
breaks, ...
llvm-svn: 220801
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 220781
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void
SomeFunction(int parameter);
After:
void SomeFunction(
int parameter);
(Unless AlwaysBreakAfterDefinitionReturnType after type is set).
llvm-svn: 220686
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
SomeFunction([]() {
#define A a
return 43; });
After:
SomeFunction([]() {
#define A a
return 43;
});
llvm-svn: 220684
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
optional Type type = 1 [(mutate_options) = {vital : true
abc : false}];
After:
optional Type type = 1 [(mutate_options) = {
vital : true
abc : false
}];
llvm-svn: 220679
|
|
|
|
|
|
|
|
|
|
| |
Before:
bool a = 2 <::SomeFunction();
After:
bool a = 2 < ::SomeFunction();
llvm-svn: 220505
|
|
|
|
| |
llvm-svn: 220375
|
|
|
|
| |
llvm-svn: 220374
|
|
|
|
|
|
|
|
|
|
| |
Before:
auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa -> f()) {}
After:
auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa->f()) {}
llvm-svn: 220373
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
String someString = "abc" + "cde";
After:
String someString = "abc"
+ "cde";
llvm-svn: 220287
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@SuppressWarnings(value = "unchecked")
@Author(name = "abc") public void doSomething() {
}
After:
@SuppressWarnings(value = "unchecked")
@Author(name = "abc")
public void doSomething() {
}
llvm-svn: 220286
|
|
|
|
|
|
|
|
|
|
| |
Before:
A.<B>doSomething();
After:
A.<B>doSomething();
llvm-svn: 220285
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@SuppressWarnings(
value = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") public static int iiiiiiiiiiiiiiiiiiiiiiii;
After:
@SuppressWarnings(value = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
public static int iiiiiiiiiiiiiiiiiiiiiiii;
llvm-svn: 220284
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
DoSomething(new A() {
@Override public String toString() {
}
});
After:
DoSomething(new A() {
@Override
public String toString() {
}
});
llvm-svn: 220282
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
Iterable< ? > a;
Iterable< ? extends SomeObject > a;
After:
Iterable<?> a;
Iterable<? extends SomeObject> a;
llvm-svn: 220281
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
class A extends B
.C {}
After:
class A extends B.C {}
llvm-svn: 220280
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@SuppressWarnings
(value = "unchecked") public void doSomething() { .. }
After:
@SuppressWarnings(value = "unchecked")
public void doSomething() { .. }
llvm-svn: 220279
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@Override public String toString() { .. }
After:
@Override
public String toString() { .. }
llvm-svn: 220274
|
|
|
|
|
|
|
|
|
|
| |
Before:
{ void (^block)(Object * x); }
After:
{ void (^block)(Object *x); }
llvm-svn: 220270
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void F(int& i) { i. ~int(); }
After:
void F(int& i) { i.~int(); }
Also, some cleanups.
llvm-svn: 220269
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Before:
[self aaaaa:MACRO(a, b :, c :)];
After:
[self aaaaa:MACRO(a, b:, c:)];
llvm-svn: 220197
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
auto SomeFunction(
A aaaaaaaaaaaaaaaaaaaaa) const -> decltype(f(aaaaaaaaaaaaaaaaaaaaa)) {}
After:
auto SomeFunction(A aaaaaaaaaaaaaaaaaaaaa) const
-> decltype(f(aaaaaaaaaaaaaaaaaaaaa)) {}
llvm-svn: 220043
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
public void doSooooooooooooooooooooooooooomething() throws
LooooooooooooooooooooooooooooongException {}
After:
public void doSooooooooooooooooooooooooooomething()
throws LooooooooooooooooooooooooooooongException {}
llvm-svn: 220041
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
SomeFunction(aaaaaaaaaaaaaaaaa,
// comment.
ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa
: bbbbbbbbbbbbbbbbbbbb);
After:
SomeFunction(aaaaaaaaaaaaaaaaa,
// comment.
ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb);
llvm-svn: 219921
|
|
|
|
|
|
|
|
|
|
| |
Before:
return (a)[foo bar : baz];
After:
return (a)[foo bar:baz];
llvm-svn: 219919
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This is desirable for the Chromium style guide:
http://www.chromium.org/developers/coding-style
llvm-svn: 219400
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
SomeFunction(a, a,
// comment
b + x);
After:
SomeFunction(a, a,
// comment
b + x);
llvm-svn: 219209
|
|
|
|
|
|
|
|
|
|
| |
Before:
#define LENGTH(x, y) (x) - (y)+1
After:
#define LENGTH(x, y) (x) - (y) + 1
llvm-svn: 219119
|
|
|
|
|
|
|
|
|
| |
Specifically, this also counts for stuff like (with style "inline"):
var x = function() {
return 1;
};
llvm-svn: 218689
|
|
|
|
|
|
| |
Introduced in r217880.
llvm-svn: 218597
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
getSomeLongPromise(.....)
.then(
function(value) {
body();
body();
})
.thenCatch(function(error) {
body();
body();
});
After:
getSomeLongPromise(.....)
.then(function(value) {
body();
body();
})
.thenCatch(function(error) {
body();
body();
});
llvm-svn: 218595
|
|
|
|
|
|
|
| |
Chromium's now using some c++11 language features, so it's now fine that
clang-format produces vector<vector<int>>.
llvm-svn: 218392
|
|
|
|
|
|
|
|
|
|
| |
Before:
return ('aaa')in bbbb;
After:
return ('aaa') in bbbb;
llvm-svn: 218119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
It has proven to not be a food idea in many case.
llvm-svn: 218107
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
asm volatile("nop" :: : "memory");
After:
asm volatile("nop" ::: "memory");
Patch by Eugene Toder. Thank you.
llvm-svn: 217883
|
|
|
|
|
|
| |
Patch by Jean-Philippe Dufraigne, Thank you!
llvm-svn: 217880
|