- Jun 22, 2015
-
-
Alexander Kornienko authored
The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240270 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 19, 2015
-
-
Daniel Jasper authored
conservative. In particular, this fixes an unwanted corner case. Before: string s = someFunction("aaaa" "bbbb"); After: string s = someFunction( "aaaa" "bbbb"); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240129 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
The previous one (r240021) regressed: enum E Type::f() { .. } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240127 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240110 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 18, 2015
-
-
Daniel Jasper authored
It was a bit too aggressive. With this patch, we keep on breaking here: aaaaaaaaaaaaa(aaaaaaa, "aaaaaaa" "bbbbbbb"); But don't break in: aaaaaaaaaaaaa(aaaaaaa, aaaaaaaa("aaaaaaa" "bbbbbbb")); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240024 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before, this wasn't formatted properly: enum ::C f() { return a; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240021 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: var func = function() { doSomething(); }; After: var func = function() { doSomething(); }; This is a very narrow special case which fixes most of the discrepency with what our users do. In the long run, we should try to come up with a more generic fix for indenting these. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240014 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Marjamaki authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240008 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
In essence this is meant to consistently indent multiline strings by a fixed amount of spaces from the start of the line. Don't do this in cases where it wouldn't help anyway. Before: someFunction(aaaaa, "aaaaa" "bbbbb"); After: someFunction(aaaaa, "aaaaa" "bbbbb"); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240004 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 17, 2015
-
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239903 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Patch by Mathieu Champlon. Thank you. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239900 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
This makes this consistent with non-typescript enums. Also shuffle the language-dependent stuff in mustBreakBefore to a single location. Patch initiated by Martin Probst. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239894 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Patch by Martin Probst. Before: enum { A, B } var x = 1; After: enum { A, B } var x = 1; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239893 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
starts with a given sequence of tokens. Only the one-token version is used yet, but other usages are coming up momentarily. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239892 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 15, 2015
-
-
Daniel Jasper authored
Before: var someVariable = SomeFuntion(aaaa, [ aaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccc ], aaaa); After: var someVariable = SomeFuntion(aaaa, [ aaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccc ], aaaa); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239722 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 14, 2015
-
-
Daniel Jasper authored
Before, these would not properly detected because of the char/string literal found when re-lexing after the first `: var x = `'`; // comment with matching quote ' var x = `"`; // comment with matching quote " git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239693 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 12, 2015
-
-
Benjamin Kramer authored
Sadly C++11 doesn't let us use initializers on bitfield members (DR1341). NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239606 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
sizeof(ParenState) goes from 64 bytes to 52 bytes. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239605 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239604 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: int c = []() -> int *{ return 2; }(); After: int c = []() -> int * { return 2; }(); Based on patch by James Dennett (http://reviews.llvm.org/D10410), thank you! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239600 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: case (my_int) ONE: After: case (my_int)ONE: This fixed llvm.org/PR23760 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239597 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239595 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Without it, it would do: interface I { x: string; } var y; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239593 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
statement. When an exported function would follow a class declaration, it would not be recognized as a stand-alone function. That would then collapse the following line with the current one, e.g. class C {} export function f() {} var x; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239592 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 11, 2015
-
-
Daniel Jasper authored
In the long run, these two might be independent or we might to only allow specific combinations. Until we have a corresponding request, however, it is hard to do the right thing and choose the right configuration options. Thus, just don't touch the options yet and just modify the behavior slightly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239531 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
And fix formatting issue discovered by that :-). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239530 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manuel Klimek authored
The following example used to crash clang-format. #define a\ /**/} Adjusting the indentation level cache for the line starting with the comment would lead to an out-of-bounds array read. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239521 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before clang-format would e.g. add a space into #define Q_FOREACH(x, y) which turns this into a non-function-like macro. Patch by Strager Neds, thank you! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239513 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 10, 2015
-
-
Daniel Jasper authored
assignments as enums. Top level object literals are treated as enums, and their k/v pairs are put on separate lines: X.Y = { A: 1, B: 2 }; However assignments within blocks should not be affected: function x() { y = {a:1, b:2}; } This change fixes the second case. Patch by Martin Probst. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239462 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 09, 2015
-
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239404 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
I have not succeeded in writing a proper test case for this yet and we also need to solve the underlying fundamental problem of trying too many combinations with nested blocks (basically this somewhat works around our Dijkstra algorithm). Preventing this linebreak is good anyways as usually the penalties never make us choose it (that's why I can't create a test) and it also looks ugly. Also cleaned up state comparison code that I discovered while hunting this down. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239398 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 05, 2015
-
-
Daniel Jasper authored
Before: template <typename T> auto aaaaaaaaaaaaaaaaaaaaaa(T t) -> decltype(eaaaaaaaaaaaaaaa<T>(t.a) .aaaaaaaa()); After: template <typename T> auto aaaaaaaaaaaaaaaaaaaaaa(T t) -> decltype(eaaaaaaaaaaaaaaa<T>(t.a).aaaaaaaa()); Also add a test case for a difficult template parsing case I stumbled accross. Needs fixing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239149 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
This is a more correct representation than using "Equality" introduced in r238942 which was a quick fix to solve an actual regression. According to the typescript spec, arrows behave like "low-precedence" assignments. Before: var a = a.aaaaaaa((a: a) => aaaaaaaaaaaaaaaaaaaaa(bbbbbbbbb) && aaaaaaaaaaaaaaaaaaaaa(bbbbbbb)); After: var a = a.aaaaaaa((a: a) => aaaaaaaaaaaaaaaaaaaaa(bbbbbbbbb) && aaaaaaaaaaaaaaaaaaaaa(bbbbbbb)); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239137 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 03, 2015
-
-
Daniel Jasper authored
This fixes a regression in literal formatting: Before: aaaaaaaaaaaaa = { aaaaaaaaaaaaaaaaaaaaaaaaaaaa: (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) => aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, }; After: var aaaaaaaaaaaaaaaaaaaa = { aaaaaaaaaaaaaaaaaaaaaaaaaaaa: (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) => aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, }; Also apply no-else-after-return policy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238942 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
operators to the new line. Before: LOG_IF(aaa == // bbb) << a << b; After: LOG_IF(aaa == // bbb) << a << b; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238911 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: var aaaaa: List<SomeThing> = [ new SomeThingAAAAAAAAAAAA(), new SomeThingBBBBBBBBB() ]; After: var aaaaa: List<SomeThing> = [new SomeThingAAAAAAAAAAAA(), new SomeThingBBBBBBBBB()]; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238909 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before, this couldn't be formatted at all: class X { subs = { 'b': { 'c': 1, }, }; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238907 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: return () =>[]; After: return () => []; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238875 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 02, 2015
-
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238873 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238845 91177308-0d34-0410-b5e6-96231b3b80d8
-