| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
Merge template strings (marked by backticks ``).
Do not format any contents of template strings.
Patch by Martin Probst. Thank you.
llvm-svn: 230011
|
|
|
|
|
|
| |
Patch by Martin Probst, thank you!
llvm-svn: 229865
|
|
|
|
|
|
| |
Patch by Martin Probst.
llvm-svn: 229863
|
|
|
|
|
|
| |
Patch by Martin Probst. Thank you.
llvm-svn: 229862
|
|
|
|
|
|
| |
Committing patch http://reviews.llvm.org/D6800.
llvm-svn: 229783
|
|
|
|
|
|
|
|
| |
Based on Java annotation support and style.
Patch by Martin Probst.
llvm-svn: 229703
|
|
|
|
|
|
|
|
|
|
| |
This adds support for JavaScript class definitions (again following
TypeScript & AtScript style). This only required support for
visibility modifiers in JS, everything else was already working.
Patch by Martin Probst, thank you.
llvm-svn: 229701
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for type annotations that follow TypeScript's,
Flow's, and AtScript's syntax style.
Patch by Martin Probst, thank you.
Review: http://reviews.llvm.org/D7721
llvm-svn: 229700
|
|
|
|
| |
llvm-svn: 229486
|
|
|
|
| |
llvm-svn: 229485
|
|
|
|
|
|
| |
requiring the macro. NFC; Clang edition.
llvm-svn: 229339
|
|
|
|
| |
llvm-svn: 229326
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents contracting:
auto lambda = []() {
int a = 2
#if A
+ 2
#endif
;
};
into:
auto lambda = []() { int a = 2
#if A + 2
#endif ; };
Which is obviously BAD.
This fixes llvm.org/PR22496.
llvm-svn: 228522
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@try {
// ...
}
@finally {
// ...
}
Now:
@try {
// ...
} @finally {
// ...
}
This is consistent with how we format C++ try blocks and SEH try blocks.
clang-format not doing this before was an implementation oversight.
This is dependent on BraceBreakingStyle. The snippet above is with the
Attach style. Style Stroustrip for example still results in the "Before:"
snippet, which makes sense since other blocks (try, else) break after '}' too.
llvm-svn: 228483
|
|
|
|
| |
llvm-svn: 228288
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lets clang-format format
__try {
} __except(0) {
}
and
__try {
} __finally {
}
correctly. __try and __finally are keywords if `LangOpts.MicrosoftExt` is set,
so this turns this on. This also enables a few other keywords, but it
shouldn't overly perturb regular clang-format operation. __except is a
context-sensitive keyword, so `AdditionalKeywords` needs to be passed around to
a few more places.
Fixes PR22321.
llvm-svn: 228148
|
|
|
|
|
|
|
| |
Added an assertion that triggered in an existing test case (without
observable differences) and fixed the code.
llvm-svn: 227677
|
|
|
|
|
|
|
|
|
|
| |
I have so far not succeeded in finding a nicely reduced test case or an
observable difference which could help me create a test failure without
msan.
Committing without test to unblock kcc's further fuzzing progress.
llvm-svn: 227433
|
|
|
|
| |
llvm-svn: 227427
|
|
|
|
|
|
|
|
| |
We did't properly mark all of an AnnotatedLine's children as finalized
and thus would reformat the same tokens in different branches of #if/#else
sequences leading to invalid replacements.
llvm-svn: 226930
|
|
|
|
|
|
|
|
|
|
| |
Before:
*a = b *c;
After:
*a = b * c;
llvm-svn: 226923
|
|
|
|
| |
llvm-svn: 226698
|
|
|
|
| |
llvm-svn: 226685
|
|
|
|
| |
llvm-svn: 226680
|
|
|
|
|
|
| |
Discovered by the awesome test case and ASAN.
llvm-svn: 226678
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
const char *x =
"hello llvm";
After:
const char *x = "hello llvm";
This fixes llvm.org/PR22245.
Patch by Bill Meltsner, thank you!
llvm-svn: 226564
|
|
|
|
|
|
|
|
| |
Crashing input:
/\
/ comment
llvm-svn: 226454
|
|
|
|
|
|
|
|
|
|
|
| |
Previously crashing input:
void f(
#if A
);
#else
#endif
llvm-svn: 226451
|
|
|
|
|
|
| |
Input "a<," made clang-format crash.
llvm-svn: 226450
|
|
|
|
| |
llvm-svn: 226449
|
|
|
|
| |
llvm-svn: 226448
|
|
|
|
| |
llvm-svn: 226447
|
|
|
|
|
|
|
| |
This assert would trigger on:
#d , = }
llvm-svn: 226446
|
|
|
|
|
|
|
| |
Disable AlwaysBreakBeforeMultilineString, as the style guides don't
really say to do so.
llvm-svn: 225982
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
try
(SomeResource rs = someFunction()) {
Something();
}
After:
try (SomeResource rs = someFunction()) {
Something();
}
llvm-svn: 225973
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
boolean someFunction(@Param(aaaaaaaaaaaaaaaa)
String aaaaa,
String bbbbbbbbbbbbbbb) {}
After:
boolean someFunction(
@Param(aaaaaaaaaaaaaaaa) String aaaaa,
String bbbbbbbbbbbbbbb) {}
llvm-svn: 225971
|
|
|
|
| |
llvm-svn: 225965
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@Test
ReturnType
doSomething(String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {}
After:
@Test
ReturnType doSomething(
String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {}
llvm-svn: 225964
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@SomeAnnotation
(aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa)
int i;
After:
@SomeAnnotation(
aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa)
int i;
llvm-svn: 225963
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@Test(a)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaa);
After:
@Test(a)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
aaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa);
llvm-svn: 225962
|
|
|
|
|
|
|
|
|
|
| |
Before:
public native<X> Foo foo();
After:
public native <X> Foo foo();
llvm-svn: 225839
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6894
llvm-svn: 225628
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
Constructor()
: Constructor([] { // comment
int i;
}) {}
After:
Constructor()
: Constructor([] { // comment
int i;
}) {}
llvm-svn: 225625
|
|
|
|
|
|
|
|
|
| |
Specifically, adjust the leading "__asm {" and trailing "}" while still
leaving the assembly inside it alone.
This fixes llvm.org/PR22190.
llvm-svn: 225623
|
|
|
|
| |
llvm-svn: 225559
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes piped output easier to read in many instances.
Before:
llvm::errs() << aaaa << std::endl << bbbb << std::endl;
After:
llvm::errs() << aaaa << std::endl
<< bbbb << std::endl;
Also fix a few instance of "don't use else after return" as per the
coding standards.
llvm-svn: 225444
|
|
|
|
|
|
|
|
|
|
| |
Before:
struct A < std::enable_if<sizeof(T2) <sizeof(int32)>::type>;
After:
struct A<std::enable_if<sizeof(T2) < sizeof(int32)>::type>;
llvm-svn: 225435
|
|
|
|
|
|
|
|
|
|
|
| |
r225141 changed the defaults of AllowShortIfStatementsOnASingleLine and
AlignTrailingComments for Google style and added explicit overrides for
Chromium style to undo these changes. For AllowShortIfStatementsOnASingleLine
that's good as the Android style guide (which Chromium uses for Java) explicitly
permits single-line ifs. But it's silent on trailing comments, to it makes
sense for Chromium style to just follow Google style.
llvm-svn: 225363
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents clang-format from moving/aligning the comment in the
snippet:
void f() {
int i; // some comment
// some unrelated comment
}
llvm-svn: 225352
|
|
|
|
|
|
|
|
|
|
| |
Before:
** outparam = 1;
After:
**outparam = 1;
llvm-svn: 225349
|