summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-format] Break before a sequence of line comments aligned with the ↵Krasimir Georgiev2017-02-082-12/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | next line. Summary: Make the comment alignment respect sections of line comments originally alinged with the next token. Until now the decision how to break a continuous sequence of line comments into sections was taken without reference to the next token. source: ``` class A { public: // comment about public // comment about a int a; } ``` format before: ``` class A { public: // comment about public // comment about a int a; } ``` format after: ``` class A { public: // comment about public // comment about a int a; } ``` Reviewers: djasper, klimek Reviewed By: klimek Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29626 llvm-svn: 294435
* clang-format: Fix bad variable declaration detection.Daniel Jasper2017-02-071-1/+5
| | | | | | | | | | | | Before: LooooooooooooooooongType variable(nullptr, [](A *a) {}); After: LooooooooooooooooongType variable(nullptr, [](A *a) {}); llvm-svn: 294358
* clang-format: [JS] correcly format object literal methods.Martin Probst2017-02-072-8/+18
| | | | | | | | | | | | | | | | | | | | | Summary: In JavaScript, object literals can contain methods: var x = { a() { return 1; }, }; Previously, clang-format always parsed nested {} inside a braced list as further braced lists. Special case this logic for JavaScript to try parsing as a braced list, but fall back to parsing as a child block. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D29656 llvm-svn: 294315
* clang-format: [JS] exclaim preceding regex literals.Martin Probst2017-02-071-1/+3
| | | | | | | | | | | | | | | | | | | | Summary: Regex detection would incorrectly classify a trailing `!` operator (nullability cast) followed by a `/` as the start of a regular expression literal. This fixes code such as: var foo = x()! / 10; Which would previously parse a regexp all the way to the end of the source file (or next `/`). Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29634 llvm-svn: 294304
* clang-format: [JS] handle parenthesized class expressions.Martin Probst2017-02-072-7/+20
| | | | | | | | | | | | | | | | | | | | Summary: In JavaScript, classes are expressions, so they can appear e.g. in argument lists. var C = foo(class { bar() { return 1; } }; Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29635 llvm-svn: 294302
* clang-format: Fix bug with conflicting BreakBeforeBinaryOperations and ↵Daniel Jasper2017-02-061-1/+2
| | | | | | | | | | | | | | | | AlignAfterOpenBracket Fix for the formatting options combination of BreakBeforeBinaryOperators: All, AlignAfterOpenBracket: AlwaysBreak not handling long templates correctly. This patch allows a break after an opening left parenthesis, TemplateOpener, or bracket when both options are enabled. Patch by Daphne Pfister, thank you! Fixes llvm.org/PR30304. llvm-svn: 294179
* clang-format: [JS] Fix bugs in parsing and aligning template strings.Daniel Jasper2017-02-032-3/+5
| | | | llvm-svn: 294009
* [clang-format] Re-align broken comment lines where appropriate.Krasimir Georgiev2017-02-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+2
| | | | llvm-svn: 293995
* [clang-format] Don't reflow across comment pragmas.Krasimir Georgiev2017-02-025-22/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-023-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+12
| | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | 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-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+6
| | | | | | | | | | | | | | | | | | | | 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
* Keep Chromium ObjC column limit at 80 for consistency with C++Nico Weber2017-01-311-0/+2
| | | | | | | https://reviews.llvm.org/D29337 Patch from Dan Beam <dbeam@chromium.org>! llvm-svn: 293675
* [clang-format] Fix regression about adding leading whitespace to the content ↵Krasimir Georgiev2017-01-311-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+13
| | | | | | | | | | | | | | | | | | | | 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-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-312-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-312-1/+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-3/+5
| | | | | | | | | | | 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-1/+3
| | | | | | | | | | | | | | | | 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] Refactor WhitespaceManager and friendsDaniel Jasper2017-01-3110-211/+182
| | | | | | | | | | | | | | | | | | | The main motivation behind this is to cleanup the WhitespaceManager and make it more extensible for future alignment etc. features. Specifically, WhitespaceManager has started to copy more and more code that is already present in FormatToken. Instead, I think it makes more sense to actually store a reference to each FormatToken for each change. This has as a consequence led to a change in the calculation of indent levels. Now, we actually compute them for each Token ahead of time, which should be more efficient as it removes an unsigned value for the ParenState, which is used during the combinatorial exploration of the solution space. No functional changes intended. Review: https://reviews.llvm.org/D29300 llvm-svn: 293616
* [clang-format] Fix regression that breaks comments without a comment prefixKrasimir Georgiev2017-01-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+8
| | | | | | | | | | | | | | | | | | | | | 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-1/+12
| | | | | | | | | | | | | | | 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-259-289/+891
| | | | | | | | | | | | | | | | | | 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-6/+6
| | | | | | | | | | | 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-171-35/+29
| | | | | | | | | | 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-162-28/+46
| | | | | | | | | | | | | | | | | 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-2/+1
| | | | | | | | | | | | 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-5/+5
| | | | | | | | | | | | | | | | | | | | | 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-8/+4
| | | | | | | | | | | | | | 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/+7
| | | | | | | | | | | | | | | | | 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-6/+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] ASI after importsMartin Probst2017-01-091-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* clang-format: [JS] avoid indent after ambient function declarations.Martin Probst2017-01-041-1/+4
| | | | | | | | | | | | | | | | | | | | | 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
* Change clang-format's Chromium JavaScript defaultsNico Weber2017-01-041-0/+3
| | | | | | | | | | | | | | Chromium is starting to use clang-format on more JavaScript. In doing this, we discovered that our defaults were not doing a good job differentiating between JS and C++. This change moves some defaults to only apply to C++. https://reviews.llvm.org/D28165 Patch from Dan Beam <dbeam@chromium.org>! llvm-svn: 290930
* Use after move bug fixesPiotr Padlewski2016-12-233-10/+15
| | | | | | | | | | | | Summary: Bunch of fixed bugs in Clang after running misc-use-after-move in clang-tidy. Reviewers: rsmith, mboehme Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D27752 llvm-svn: 290424
* clang-format: Less eagerly try to keep label-value pairs on a line.Daniel Jasper2016-12-221-1/+1
| | | | | | | | | | | | | | | 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-1/+5
| | | | | | | | | | | 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-8/+6
| | | | | | | | | | | | | | | | | | | 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-2/+5
| | | | | | | | | | | | | | | 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
* [Format] Remove dead code.Benjamin Kramer2016-12-194-31/+0
| | | | | | No functionality change. llvm-svn: 290135
* clang-format: Slightly tweak the behavior of <<-wrapping.Daniel Jasper2016-12-192-3/+8
| | | | | | | | | | | | | | | 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-1/+1
| | | | llvm-svn: 290093
* clang-format: Fix regression introduced in r290084.Daniel Jasper2016-12-191-0/+8
| | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud