| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
In Java, enums can contain a class body and enum constants can have
arguments as well as class bodies. Support most of that.
llvm-svn: 221895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
b = a &&
// Comment
b.c &&
d;
After:
b = a &&
// Comment
b.c && d;
This fixes llvm.org/PR21535.
llvm-svn: 221727
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
vector<int> SomeVector = {// aaa
1, 2,
};
After:
vector<int> SomeVector = {
// aaa
1, 2,
};
llvm-svn: 221699
|
|
|
|
|
|
|
|
|
| |
Before:
void f(Bar* a = nullptr, Bar * b);
After:
void f(Bar* a = nullptr, Bar* b);
llvm-svn: 221609
|
|
|
|
|
|
|
|
|
| |
'@' followed by any keyword can't be an annotation, but @interface is currently
the only combination of '@' and a keyword that's allowed, so limit it to this
case. `@interface Foo` without a leading `public` was misformatted prior to
this patch.
llvm-svn: 221607
|
|
|
|
|
|
|
|
| |
This reverts commit eefd2eaad43c5c2b17953ae7ed1e72b28e696f7b.
Apparently, this change was a bit premature.
llvm-svn: 221365
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
SOME_WEIRD_LOG_MACRO
<< "Something long enough to cause a line break";
After:
SOME_WEIRD_LOG_MACRO
<< "Something long enough to cause a line break";
llvm-svn: 221338
|
|
|
|
|
|
|
|
|
| |
Slightly easier to write, more efficient and prevents bugs by
misspelling them.
No functional changes intended.
llvm-svn: 221259
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@SomeAnnotation()
abstract
class aaaaaaaaa<a> extends bbbbbbbbbbbb<b> implements cccccccccccc {
}
After:
@SomeAnnotation()
abstract class aaaaaaaaa<a> extends bbbbbbbbbbbb<b>
implements cccccccccccc {
}
llvm-svn: 221256
|
|
|
|
|
|
|
|
|
| |
This reverts commit b5bdb2ef59ab922bcb4d6e843fffaee1f7f68a8c.
This doesn't really seem necessary on second though and causes problems
with C++ enum formatting.
llvm-svn: 221158
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
enum SomeThing { ABC, CDE }
;
After:
enum SomeThing { ABC, CDE };
llvm-svn: 221125
|
|
|
|
|
|
|
|
|
|
| |
Before:
< T extends B > T getInstance(Class<T> type);
After:
<T extends B> T getInstance(Class<T> type);
llvm-svn: 221124
|
|
|
|
|
|
|
|
|
|
| |
Before:
public static<R> ArrayList<R> get() {}
After:
public static <R> ArrayList<R> get() {}
llvm-svn: 221122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@SomeAnnotation()
abstract
class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb implements cccccccccccc {
}
After:
@SomeAnnotation()
abstract class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb
implements cccccccccccc {
}
llvm-svn: 221121
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
delete [] a -> b;
After:
delete[] a->b;
This fixes part of llvm.org/PR21419.
llvm-svn: 221114
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
class SomeClass {
enum SomeThing { ABC, CDE } void f() {
}
}
After:
class SomeClass {
enum SomeThing { ABC, CDE }
void f() {
}
}
This fixed llvm.org/PR21458.
llvm-svn: 221113
|
|
|
|
|
|
| |
This fixes llvm.org/PR21453.
llvm-svn: 221112
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
synchronized(mData) {
// ...
}
After:
synchronized (mData) {
// ...
}
This fixes llvm.org/PR21455.
llvm-svn: 221110
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@Override
public Map < String,
? > getAll() {
// ...
}
After:
@Override
public Map<String, ?> getAll() {
// ...
}
This fixes llvm.org/PR21454.
llvm-svn: 221109
|
|
|
|
| |
llvm-svn: 221104
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Format.h doesn't use stack.
llvm-svn: 220879
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
style.
llvm-svn: 220778
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|