summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-format] Re-align broken comment lines where appropriate.Krasimir Georgiev2017-02-031-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The comment aligner was skipping over newly broken comment lines. This patch fixes that. source: ``` int ab; // line int a; // long long ``` format with column limit 15 before: ``` int ab; // line int a; // long // long ``` format with column limit 15 after: ``` int ab; // line int a; // long // long ``` Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29486 llvm-svn: 293997
* clang-format: [Proto] Also supports implicit string literal concatenationDaniel Jasper2017-02-031-0/+3
| | | | llvm-svn: 293995
* [clang-format] Don't reflow across comment pragmas.Krasimir Georgiev2017-02-021-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The comment reflower wasn't taking comment pragmas as reflow stoppers. This patch fixes that. source: ``` // long long long long // IWYU pragma: ``` format with column limit = 20 before: ``` // long long long // long IWYU pragma: ``` format with column limit = 20 after: ``` // long long long // long // IWYU pragma: ``` Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29450 llvm-svn: 293898
* [clang-format] Fix breaking of comment sections in unwrapped lines ↵Krasimir Georgiev2017-02-021-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | containing newlines. Summary: The breaking of line comment sections was misaligning the case where the first comment line is on an unwrapped line containing newlines. In this case, the breaking column must be based on the source column of the last token that is preceded by a newline, not on the first token of the unwrapped line. source: ``` enum A { a, // line 1 // line 2 }; ``` format before: ``` enum A { a, // line 1 // line 2 }; ``` format after: ``` enum A { a, // line 1 // line 2 }; ``` Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29444 llvm-svn: 293891
* [clang-format] Don't reflow lines starting with TODO, FIXME or XXX.Krasimir Georgiev2017-02-021-0/+24
| | | | | | | | | | | | | | Summary: These lines commonly carry a special meaning. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29396 llvm-svn: 293878
* clang-format: Do not use two-argument/operand special case with no alignmentDaniel Jasper2017-02-021-0/+4
| | | | | | | | | | | | | | | | | Without alignment, there is no clean separation between the arguments, even if there are only two. Before: aaaaaaaaaaaaaa( aaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: aaaaaaaaaaaaaa(aaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 293875
* clang-format: Fix incorrect line breaks after forced operator wraps.Daniel Jasper2017-02-011-0/+9
| | | | | | | | | | | | | | | | | Before: bool x = aaaaa // || bbbbb // || cccc; After: bool x = aaaaa // || bbbbb // || cccc; llvm-svn: 293839
* [clang-format] Fix regression about not aligning trailing comments in case ↵Krasimir Georgiev2017-02-011-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | they were previously aligned, but at different indent. Summary: Comment reflower was adding untouchable tokens in case two consecutive comment lines are aligned in the source code. This disallows the whitespace manager to re-indent them later. source: ``` int i = f(abc, // line 1 d, // line 2 // line 3 b); ``` Since line 2 and line 3 are aligned, the reflower was marking line 3 as untouchable; however the three comment lines need to be re-aligned. output before: ``` int i = f(abc, // line 1 d, // line 2 // line 3 b); ``` output after: ``` int i = f(abc, // line 1 d, // line 2 // line 3 b); ``` Reviewers: djasper Reviewed By: djasper Subscribers: sammccall, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29383 llvm-svn: 293755
* clang-format: Don't force-wrap multiline RHSs for 2-operand experssions.Daniel Jasper2017-02-011-25/+55
| | | | | | | | | | | | | | | | | | | | This rows back on r288120, r291801 and r292110. I apologize in advance for the churn. All of those revisions where meant to make the wrapping of RHS expressions more consistent. However, now that they are consistent, we seem to be a bit too eager. The reasoning here is that I think it is generally correct that we want to line-wrap before multiline RHS expressions (or multiline arguments to a function call). However, if there are only two of such operands or arguments, there is always a clear vertical separation between them and the additional line break seems much less desirable. Somewhat good examples are expressions like: EXPECT_EQ(2, someLongExpression( orCall)); llvm-svn: 293752
* [clang-format] Fix regression about adding leading whitespace to the content ↵Krasimir Georgiev2017-01-311-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of line comments Summary: The reflower didn't measure precisely the line column of a line in the middle of a line comment section that has a prefix that needs to be adapted. source: ``` /// a //b ``` format before: ``` /// a //b ``` format after: ``` /// a // b ``` Reviewers: djasper Reviewed By: djasper Subscribers: sammccall, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29329 llvm-svn: 293641
* clang-format: [JS] Indent expressions in ${} relative to their surroundingDaniel Jasper2017-01-311-0/+57
| | | | | | | | | | | | | | | | | | | | This only affects expressions inside ${} scopes of template strings. Here, we want to indent relative to the surrounding template string and not the surrounding expression. Otherwise, this can create quite a mess. Before: var f = ` aaaaaaaaaaaaaaaaaa: ${someFunction( aaaaa + // bbbb)}`; After: var f = ` aaaaaaaaaaaaaaaaaa: ${someFunction( aaaaa + // bbbb)}`; llvm-svn: 293636
* [clang-format] Fix reflow in block comment lines with leading whitespace.Krasimir Georgiev2017-01-311-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The reflower was not taking into account the additional leading whitespace in block comment lines. source: ``` { /* * long long long long * long * long long long long */ } ``` format (with column limit 20) before: ``` { /* * long long long * long long long long * long long */ } ``` format after: ``` { /* * long long long * long long long * long long long */ } ``` Reviewers: djasper, klimek Reviewed By: djasper Subscribers: cfe-commits, sammccall, klimek Differential Revision: https://reviews.llvm.org/D29326 llvm-svn: 293633
* [clang-format] Fix regression merging comments across newlines.Krasimir Georgiev2017-01-311-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes a regression that causes example: ``` enum A { a, // line a // line b b }; ``` to be formatted as follows: ``` enum A { a, // line a // line b b }; ``` Reviewers: djasper, klimek Reviewed By: klimek Subscribers: cfe-commits, sammccall, djasper, klimek Differential Revision: https://reviews.llvm.org/D29322 llvm-svn: 293624
* clang-format: [JS] Properly set scopes inside template strings.Daniel Jasper2017-01-311-0/+7
| | | | | | | | | | | | | Before: var f = `aaaaaaaaaaaaa:${aaaaaaa .aaaaa} aaaaaaaa aaaaaaaaaaaaa:${aaaaaaa.aaaaa} aaaaaaaa`; After: var f = `aaaaaaaaaaaaa:${aaaaaaa.aaaaa} aaaaaaaa aaaaaaaaaaaaa:${aaaaaaa.aaaaa} aaaaaaaa`; llvm-svn: 293622
* clang-format: [JS] Fix incorrect line break in template strings.Daniel Jasper2017-01-311-0/+4
| | | | | | | | | | | Before: var f = `aaaa ${a ? 'a' : 'b' }`; After: var f = `aaaa ${a ? 'a' : 'b'}`; llvm-svn: 293618
* [clang-format] Don't reflow comment lines starting with '@'.Krasimir Georgiev2017-01-311-0/+9
| | | | | | | | | | | | | | | | Summary: This patch stops reflowing comment lines starting with '@', since they commonly have a special meaning. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29323 llvm-svn: 293617
* [clang-format] Fix regression that breaks comments without a comment prefixKrasimir Georgiev2017-01-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Consider formatting the following code fragment with column limit 20: ``` { // line 1 // line 2\ // long long long line } ``` Before this fix the output is: ``` { // line 1 // line 2\ // long long long line } ``` This patch fixes a regression that breaks the last comment line without adding the '//' prefix. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29298 llvm-svn: 293548
* [clang-format] Separate line comment sections after a right brace from ↵Krasimir Georgiev2017-01-301-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | comment sections in the scope. Summary: The following two comment lines form a single comment section: ``` if (1) { // line 1 // line 2 } ``` This is because the break of a comment section was based on the original column of the first token of the previous line (in this case, the 'if'). This patch splits these two comment lines into different sections by taking into account the original column of the right brace preceding the first line comment where applicable. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29291 llvm-svn: 293539
* clang-format: [JavaScript] Undo r291974 for JavaScript.Daniel Jasper2017-01-301-0/+10
| | | | | | | | | | | | | | | | | | | | | This had significant negative consequences and I don't have a good solution for it yet. Before: var string = [ 'aaaaaa', 'bbbbbb', ] .join('+'); After: var string = [ 'aaaaaa', 'bbbbbb', ].join('+'); llvm-svn: 293465
* clang-format: [JS] do not format MPEG transport streams.Martin Probst2017-01-271-0/+9
| | | | | | | | | | | | | | | Summary: The MPEG transport stream file format also uses ".ts" as its file extension. This change detects its specific framing format (0x47 every 189 bytes) and simply ignores MPEG TS files. Reviewers: djasper, sammccall Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D29186 llvm-svn: 293270
* [clang-format] Implement comment reflowing.Krasimir Georgiev2017-01-252-5/+486
| | | | | | | | | | | | | | | | | | Summary: This presents a version of the comment reflowing with less mutable state inside the comment breakable token subclasses. The state has been pushed into the driving breakProtrudingToken method. For this, the API of BreakableToken is enriched by the methods getSplitBefore and getLineLengthAfterSplitBefore. Reviewers: klimek Reviewed By: klimek Subscribers: djasper, klimek, mgorny, cfe-commits, ioeric Differential Revision: https://reviews.llvm.org/D28764 llvm-svn: 293055
* clang-format: fix fallback style set to "none" not always formattingAntonio Maiorano2017-01-201-1/+19
| | | | | | | | | | | This fixes clang-format not formatting if fallback-style is explicitly set to "none", and either a config file is found or YAML is passed in without a "BasedOnStyle". With this change, passing "none" in these cases will have no affect, and LLVM style will be used as the base style. Differential Revision: https://reviews.llvm.org/D28844 llvm-svn: 292562
* clang-format: Make GetStyle return Expected<FormatStyle> instead of FormatStyleAntonio Maiorano2017-01-172-9/+42
| | | | | | | | | | Change the contract of GetStyle so that it returns an error when an error occurs (i.e. when it writes to stderr), and only returns the fallback style when it can't find a configuration file. Differential Revision: https://reviews.llvm.org/D28081 llvm-svn: 292174
* clang-format: Always wrap before multi-line parameters/operands.Daniel Jasper2017-01-161-24/+32
| | | | | | | | | | | | | | | | | Before: aaaaaaaaaaaaaaaaaa(aaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaa); After: aaaaaaaaaaaaaaaaaa(aaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaa); No new test cases, as the existing ones cover this fairly well. llvm-svn: 292110
* clang-format: [JS] revert over-eager ASI check.Martin Probst2017-01-161-4/+22
| | | | | | | | | | | | Summary: Change r291428 introduced ASI detection after closing curly braces. That would generally be correct, however this breaks indentation for structural statements. What happens is that CompoundStatementIndenter increases indentation for the current line, then after reading ASI creates a new line (with the increased line level), and only after the structural parser sees e.g. the if/then/else branch closed, line level is reduced. That leads to the new line started by ASI having a level too high. Reviewers: djasper Subscribers: sammccall, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D28763 llvm-svn: 292099
* clang-format: Fix bug in making line break decisions.Daniel Jasper2017-01-131-0/+6
| | | | | | | | | | | | | | | | | | | | | Here, the optimization to not line wrap when it would not lead to a reduction in columns was overwriting and enforced break that we want to do no matter what. Before: int i = someFunction( aaaaaaa, 0).aaa(aaaaaaaaaaaaa) * aaaaaaa + aaaaaaa; After: int i = someFunction(aaaaaaa, 0) .aaa(aaaaaaaaaaaaa) * aaaaaaa + aaaaaaa; llvm-svn: 291974
* clang-format: Fix regression introduced by r291801.Daniel Jasper2017-01-121-0/+2
| | | | | | | | | | | | | | Uncovered by polly tests. Before: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaa, {}, aaaaaaaaaaaaaaaaaaaaaaa); After: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaa, {}, aaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 291807
* clang-format: Treat braced lists like other complex parameters.Daniel Jasper2017-01-121-0/+6
| | | | | | | | | | | | | | | | | Specifically, wrap before them if they are multi-line so that we don't create long hanging indents. This prevents having a lot of code indented a lot in some cases. Before: someFunction(Param, {List1, List2, List3}); After: someFunction(Param, {List1, List2, List3}); llvm-svn: 291801
* clang-format: Improve support for override/final as variable names.Daniel Jasper2017-01-091-0/+4
| | | | | | | | | | | | | | | | Before: bool a = f() &&override.f(); bool a = f() &&final.f(); void f(const MyOverride & override); void f(const MyFinal & final); After: bool a = f() && override.f(); bool a = f() && final.f(); void f(const MyOverride &override); void f(const MyFinal &final); llvm-svn: 291434
* clang-format: [JS] fix broken test.Martin Probst2017-01-091-1/+3
| | | | llvm-svn: 291429
* clang-format: [JS] ASI after importsMartin Probst2017-01-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Automatic semicolon insertion should break import and export statements: Before, this would format on one line: // Note: no semi after 'x' below! import {x} from 'x' export function foo() {} Into: import {x} from 'x' export function foo() {} With this change, the statements get separated. This also improves automatic semicolon insertion to consider closing braces preceding declarations and statements. Reviewers: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28465 llvm-svn: 291428
* TypoJoerg Sonnenberger2017-01-051-2/+2
| | | | llvm-svn: 291148
* clang-format: [JS] avoid indent after ambient function declarations.Martin Probst2017-01-041-0/+10
| | | | | | | | | | | | | | | | | | | | | Summary: Before: declare function foo(); let x = 1; After: declare function foo(); let x = 1; The problem was that clang-format would unconditionally try to parse a child block, even though ambient function declarations do not have a body (similar to forward declarations). Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D28246 llvm-svn: 290959
* clang-format: Less eagerly try to keep label-value pairs on a line.Daniel Jasper2016-12-221-0/+4
| | | | | | | | | | | | | | | Before: string v = StrCat("aaaaaaaaaaaaaaaaaaaaaaaaaaa: ", SomeFunction(aaaaaaaaaaaa, aaaaaaaaaaaaaaa), bbbbbbbbbbbbbbbbbbbbbbb); After: string v = StrCat("aaaaaaaaaaaaaaaaaaaaaaaaaaa: ", SomeFunction(aaaaaaaaaaaa, aaaaaaaaaaaaaaa), bbbbbbbbbbbbbbbbbbbbbbb); llvm-svn: 290337
* Make FormatStyle.GetStyleOfFile test work on MSVCAntonio Maiorano2016-12-221-6/+0
| | | | | | | | | | | Modify getStyle to use vfs::FileSystem::makeAbsolute just like FS.addFile does, rather than sys::fs::make_absolute. The latter gets the CWD from the platform, while the former expects it to be set by the client, causing a mismatch when converting relative paths to absolute. Differential Revision: https://reviews.llvm.org/D27971 llvm-svn: 290319
* clang-format: Fix bug in handling of single-column lists.Daniel Jasper2016-12-211-0/+8
| | | | | | | | | | | | | | | | | | | Members that are themselves wrapped in fake parentheses would lead to AvoidBinPacking be set on the wrong ParenState. After: vector<int> aaaa = { aaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaa.aaaaaaa, aaaaaa.aaaaaaa, aaaaaa.aaaaaaa, aaaaaa.aaaaaaa, }; Before we were falling back to bin-packing these. llvm-svn: 290259
* clang-format: Fix bug in understanding string-label&value analysis.Daniel Jasper2016-12-201-0/+6
| | | | | | | | | | | | | | | While for <<-operators often used in log statments, a single key value pair is always on the second operator, e.g. llvm::errs() << "aaaaa=" << aaaaa; It is on the first operator for plus- or comma-concatenated strings: string s = "aaaaaaaaaa: " + aaaaaaaa; (the "=" not counting because that's a different operator precedence) llvm-svn: 290177
* clang-format: Slightly tweak the behavior of <<-wrapping.Daniel Jasper2016-12-191-0/+3
| | | | | | | | | | | | | | | Before: SomeLongLoggingStatementOrMacro() << "Some long text " << some_variable << "\n"; Before: SomeLongLoggingStatementOrMacro() << "Some long text " << some_variable << "\n"; Short logging statements are already special cased in a different part of the code. llvm-svn: 290094
* [clang-format] revert an unintended change in r288493 and add a test case.Eric Liu2016-12-191-0/+13
| | | | llvm-svn: 290093
* clang-format: Fix regression introduced in r290084.Daniel Jasper2016-12-191-1/+1
| | | | | | | | | | | | | | | | | | | We still want to try in linewrap within single elements of a 1-column list. After: Type *Params[] = {PointerType::getUnqual(FunctionType::get( Builder.getVoidTy(), Builder.getInt8PtrTy(), false)), Builder.getInt8PtrTy(), Builder.getInt32Ty(), LongType, LongType, LongType}; Before: No line break in the first element, so column limit violation. llvm-svn: 290090
* clang-format: Allow "single column" list layout even if that violates theDaniel Jasper2016-12-191-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | column limit. Single-column layout basically means that we format the list with one element per line. Not doing that when there is a column limit violation doesn't change the fact that there is an item that doesn't fit within the column limit. Before (with a column limit of 30): std::vector<int> a = { aaaaaaaa, aaaaaaaa, aaaaaaaa, aaaaaaaa, aaaaaaaaaa, aaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaa}; After: std::vector<int> a = { aaaaaaaa, aaaaaaaa, aaaaaaaa, aaaaaaaa, aaaaaaaaaa, aaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaa}; (and previously we would have formatted like "After" it wasn't for the one item that is too long) llvm-svn: 290084
* clang-format: Keep string-literal-label + value pairs on a line.Daniel Jasper2016-12-131-39/+49
| | | | | | | | | | | | | | | | | | | | | We have previously done that for <<-operators. This patch also adds this logic for "," and "+". Before: string v = "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa; string v = StrCat("aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa); After: string v = "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa; string v = StrCat("aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa); llvm-svn: 289531
* clang-format: Improve braced-list detection.Daniel Jasper2016-12-131-0/+13
| | | | | | | | | | | Before: vector<int> v { 12 } GUARDED_BY(mutex); After: vector<int> v{12} GUARDED_BY(mutex); llvm-svn: 289525
* clang-format: Separate out a language kind for ObjC.Daniel Jasper2016-12-123-737/+826
| | | | | | | | | | | | | While C(++) and ObjC are generally formatted the same way and can be mixed, people might want to choose different styles based on the language. This patch recognizes .m and .mm files as ObjC and also implements a very crude detection of whether or not a .h file contains ObjC code. This can be improved over time. Also move most of the ObjC tests into their own test file to keep file size maintainable. llvm-svn: 289428
* [clang-format] calculate MaxInsertOffset in the original code correctly.Eric Liu2016-12-091-0/+24
| | | | | | | | | | Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D27615 llvm-svn: 289203
* [ClangFormat] Only insert #include into the #include block in the beginning ↵Eric Liu2016-12-021-0/+87
| | | | | | | | | | | | | | | | | | of the file. Summary: This avoid inserting #include into: - raw string literals containing #include. - #if block. - Special #include among declarations (e.g. functions). Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D26909 llvm-svn: 288493
* clang-format: [JS] Properly format dict literals that skip labels.Daniel Jasper2016-11-291-0/+7
| | | | llvm-svn: 288121
* clang-format: Wrap complex binary expressions on the RHS of a comma.Daniel Jasper2016-11-291-25/+29
| | | | | | | | | Specifically, if the RHS of a comma is a complex binary expression and spans multiple lines, insert a line break before it. This usually is often more readable compared to producing a hanging indent. See changes in FormatTest.cpp for examples. llvm-svn: 288120
* clang-format: Fix unnnecessary line break.Daniel Jasper2016-11-291-0/+6
| | | | | | | | | | | | | | | Before: aaaaaaaaaa(aaaa(aaaa, aaaa), // aaaa, aaaaa); After: aaaaaaaaaa(aaaa(aaaa, aaaa), // aaaa, aaaaa); llvm-svn: 288119
* [clang-format] Fixed line merging of more than two linesCameron Desrochers2016-11-151-0/+24
| | | | | | Differential Revision: https://reviews.llvm.org/D19063 llvm-svn: 286973
OpenPOWER on IntegriCloud