Author: djasper
Date: Mon Mar 14 14:21:36 2016
New Revision: 263470
URL: http://llvm.org/viewvc/llvm-project?rev=263470&view=rev
Log:
clang-format: [JS] Handle certain cases of ASI.
Automatic Semicolon Insertion can only be properly handled by parsing
source code. However conservatively catching
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Submitted as r263470.
http://reviews.llvm.org/D17910
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mail
Author: djasper
Date: Thu Mar 17 07:17:59 2016
New Revision: 263710
URL: http://llvm.org/viewvc/llvm-project?rev=263710&view=rev
Log:
clang-format: [JS] Fix incorrect spacing around contextual keywords.
Before:
x.of ();
After:
x.of();
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
Author: djasper
Date: Thu Mar 17 07:00:22 2016
New Revision: 263709
URL: http://llvm.org/viewvc/llvm-project?rev=263709&view=rev
Log:
clang-format: Slightly weaken AlignAfterOpenBracket=AlwaysBreak.
If a call takes a single argument, using AlwaysBreak can lead to lots
of wasted lines and addition
Author: djasper
Date: Thu Mar 17 08:03:41 2016
New Revision: 263713
URL: http://llvm.org/viewvc/llvm-project?rev=263713&view=rev
Log:
clang-format: [JS] Make requoting of JavaScript string literals only
change affected ranges.
Modified:
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/unittests/
djasper created this revision.
djasper added a reviewer: klimek.
djasper added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
This patch adds a regular expression to configure suffixes of an included file
to check whether it is the "main" include of the current file. Previously,
c
djasper updated this revision to Diff 51154.
http://reviews.llvm.org/D18313
Files:
include/clang/Format/Format.h
lib/Format/Format.cpp
unittests/Format/FormatTest.cpp
unittests/Format/SortIncludesTest.cpp
Index: unittests/Format/SortIncludesTest.cpp
==
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:526
@@ +525,3 @@
+case tok::amp:
+ if (Style.Language == FormatStyle::LK_JavaScript &&
+ !Contexts.back().IsExpression) {
Don't use braces and possibly pull the comment out
djasper added inline comments.
Comment at: include/clang/Format/Format.h:415
@@ +414,3 @@
+ /// as the "main" include in both a.cc and a_test.cc.
+ std::string IncludeMainRegex;
+
I chose this name for better alphabetical ordering. I don't strongly lean
either
djasper added inline comments.
Comment at: include/clang/Tooling/Core/Replacement.h:231
@@ +230,3 @@
+typedef std::map
+FileToReplacementsMap;
+
klimek wrote:
> Honestly, I'd get rid of the typedef. Daniel, what do you think?
I agree. I don't think it carries
Author: djasper
Date: Mon Mar 21 09:11:27 2016
New Revision: 263943
URL: http://llvm.org/viewvc/llvm-project?rev=263943&view=rev
Log:
clang-format: Make include sorting's main include detection configurable.
This patch adds a regular expression to configure suffixes of an
included file to check w
djasper added a comment.
Looks good.
http://reviews.llvm.org/D18294
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: djasper
Date: Mon Mar 21 12:57:31 2016
New Revision: 263961
URL: http://llvm.org/viewvc/llvm-project?rev=263961&view=rev
Log:
clang-format: [JS] no space in union and intersection types.
The operators | and & in types, as opposed to the bitwise operators,
should not have whitespace around
djasper closed this revision.
djasper added a comment.
Submitted as r263961.
http://reviews.llvm.org/D18294
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:760
@@ +759,3 @@
+ if (CurrentToken->is(tok::kw_export)) {
+// Find the 'from' part of export {...} from '...';
+// The difference here is that "export {...};" should not be treated as
--
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good. Do you have commit access now?
http://reviews.llvm.org/D17440
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.
Author: djasper
Date: Tue Mar 22 09:32:20 2016
New Revision: 264055
URL: http://llvm.org/viewvc/llvm-project?rev=264055&view=rev
Log:
clang-format: [JS] do not wrap ES6 imports/exports.
"import ... from '...';" and "export ... from '...';" should be treated
the same as goog.require/provide/module
djasper closed this revision.
djasper added a comment.
Submitted as r264055.
http://reviews.llvm.org/D17440
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Lg.
http://reviews.llvm.org/D18432
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
he settings to have a style that does not clash too much with
> our original style, and that will look like a regression for us.
>
> Kind regards,
> Jean-Philippe.
>
>
> 2016-03-17 12:00 GMT+00:00 Daniel Jasper via cfe-commits <
> cfe-commits@lists.llvm.org>:
>
to make an argument on whether this is
>> wasted or not.
>>
>> We could add a separate option, but it is not quite as easy. AlwaysBreak
>> has never been *always* break. There have always been exceptions. Two
>> immediately spring to mind:
>> 1. When the functio
nsp::nmspc::nmspace::Value01,
>>> nsp::nmspc::nmspace::Value002 ) ),
>>> extraArg001 ) );
>>>
>>> boost::scoped_ptr< Type01 > obj002(
>>> new Type01( nsp::nmspc::TypeInfo001Ptr( new
>>> nsp::nms
Author: djasper
Date: Tue Dec 29 02:54:23 2015
New Revision: 256546
URL: http://llvm.org/viewvc/llvm-project?rev=256546&view=rev
Log:
clang-format: [JS/TypeScript] Support "enum" as property name.
Before:
enum: string
[];
After:
enum: string[];
Modified:
cfe/trunk/lib/Format/Unwrapped
Author: djasper
Date: Wed Dec 30 02:00:58 2015
New Revision: 256631
URL: http://llvm.org/viewvc/llvm-project?rev=256631&view=rev
Log:
clang-format: [JS] Support TypeScript 1.6 user defined type guards.
Before:
function foo(check: Object): check
is{foo: string, bar: string, baz: string, foobar
Author: djasper
Date: Wed Dec 30 06:23:00 2015
New Revision: 256640
URL: http://llvm.org/viewvc/llvm-project?rev=256640&view=rev
Log:
clang-format: Slightly row back on r256343 by increasing penalty for
breaking between array subscripts.
Before:
if ( && a
Author: djasper
Date: Mon Jan 4 01:27:33 2016
New Revision: 256736
URL: http://llvm.org/viewvc/llvm-project?rev=256736&view=rev
Log:
clang-format: [Proto] Improve wrapping of message field attributes.
Before:
optional AAA aaa = 1 [foo =
{
Author: djasper
Date: Mon Jan 4 01:28:12 2016
New Revision: 256737
URL: http://llvm.org/viewvc/llvm-project?rev=256737&view=rev
Log:
clang-format: [Proto] Basic support for options with <> for repeated fields.
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unittests/Format/F
Author: djasper
Date: Mon Jan 4 01:29:07 2016
New Revision: 256738
URL: http://llvm.org/viewvc/llvm-project?rev=256738&view=rev
Log:
clang-format: Fix corner-case in ObjC method declaration formatting
Before:
- (void)shortf:(GTMFoo *)theFoo
longKeyword:(NSRect)theRect
longerKeyword:(fl
Author: djasper
Date: Mon Jan 4 01:29:40 2016
New Revision: 256739
URL: http://llvm.org/viewvc/llvm-project?rev=256739&view=rev
Log:
clang-format: Fix corner case for lambda assignments.
Before:
std::function my_lambda = [](
const string &s) { return s; };
After:
std::function my_lamb
Author: djasper
Date: Mon Jan 4 01:30:44 2016
New Revision: 256740
URL: http://llvm.org/viewvc/llvm-project?rev=256740&view=rev
Log:
clang-format: Align long braced init lists even if they are nested in
function calls.
Modified:
cfe/trunk/lib/Format/FormatToken.cpp
cfe/trunk/unittests/Fo
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
http://reviews.llvm.org/D15266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
djasper added a comment.
The Google and Unity style guides have explicit examples of using the one-line
version. The other style guide (at least to me) isn't clear on forbidding what
clang-format currently does.
My gut feeling is that it is not worth the cost of renaming and extending the
curr
djasper added a comment.
I actually have more thoughts on this. If we go down this road, there are many
more options that people might envision. Maybe they don't want to wrap the
initializer list, if there is just one initializer. Maybe they want to align
the initializers somewhere after the co
Author: djasper
Date: Mon Jan 4 06:41:11 2016
New Revision: 256750
URL: http://llvm.org/viewvc/llvm-project?rev=256750&view=rev
Log:
clang-format: Fix corner case in builder-type call formatting.
Before:
return .aaa(a,
Author: djasper
Date: Mon Jan 4 07:11:41 2016
New Revision: 256753
URL: http://llvm.org/viewvc/llvm-project?rev=256753&view=rev
Log:
clang-format: [JS] Improve empty array literal detection.
Previously, the [] in the following example were recognized as an array
subscript leading to weird indent
Author: djasper
Date: Mon Jan 4 09:51:56 2016
New Revision: 256758
URL: http://llvm.org/viewvc/llvm-project?rev=256758&view=rev
Log:
clang-format: [JS] Support ES6 exports of array literals.
Before:
export default[aaa,
bb
Author: djasper
Date: Mon Jan 4 10:10:36 2016
New Revision: 256759
URL: http://llvm.org/viewvc/llvm-project?rev=256759&view=rev
Log:
clang-format: [JS] Support more ES6 default exports.
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unittests/Format/FormatTestJS.cpp
Modifie
Author: djasper
Date: Tue Jan 5 07:03:50 2016
New Revision: 256830
URL: http://llvm.org/viewvc/llvm-project?rev=256830&view=rev
Log:
clang-format: Improve line wrapping behavior in call sequences.
r256750 has been leading to an undesired behavior:
aa
..aa
Author: djasper
Date: Tue Jan 5 07:03:59 2016
New Revision: 256831
URL: http://llvm.org/viewvc/llvm-project?rev=256831&view=rev
Log:
clang-format: Avoid creating hanging indents in call sequences.
Before:
.aaa(
)
Author: djasper
Date: Tue Jan 5 07:06:27 2016
New Revision: 256832
URL: http://llvm.org/viewvc/llvm-project?rev=256832&view=rev
Log:
clang-format: Handle \n the same way as std::endl with stream operator.
clang-format breaks multi-line streams after std::endl.
It now also break for '\n', the sug
djasper closed this revision.
djasper added a comment.
Submitted as r256832.
http://reviews.llvm.org/D15266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: djasper
Date: Tue Jan 5 10:10:39 2016
New Revision: 256841
URL: http://llvm.org/viewvc/llvm-project?rev=256841&view=rev
Log:
clang-format: Fix corner case in "if it saves columns"-calculation.
Before:
.(
a
Author: djasper
Date: Thu Jan 7 06:53:59 2016
New Revision: 257057
URL: http://llvm.org/viewvc/llvm-project?rev=257057&view=rev
Log:
Add missing -no-canonical-prefixes.
Modified:
cfe/trunk/test/Driver/wasm-toolchain.c
Modified: cfe/trunk/test/Driver/wasm-toolchain.c
URL:
http://llvm.org/vi
Author: djasper
Date: Thu Jan 7 08:36:11 2016
New Revision: 257062
URL: http://llvm.org/viewvc/llvm-project?rev=257062&view=rev
Log:
clang-format: Support weird lambda macros.
Before:
MACRO((AA & a) { return 1; });
After:
MACRO((AA &a) { return 1; });
Modified:
cfe/trunk/lib/Format/Tok
Author: djasper
Date: Fri Jan 8 01:06:07 2016
New Revision: 257154
URL: http://llvm.org/viewvc/llvm-project?rev=257154&view=rev
Log:
clang-format: [JS] Support more ES6 classes.
Before:
foo = class {
constructor() {}
}
;
After:
foo = class {
constructor() {}
};
Modified:
Author: djasper
Date: Fri Jan 8 02:14:58 2016
New Revision: 257159
URL: http://llvm.org/viewvc/llvm-project?rev=257159&view=rev
Log:
clang-format: [JS] Add some Closure Compiler JSDoc tags to the default
Google configuration so that they aren't line-wrapped.
Modified:
cfe/trunk/lib/Format/Fo
Author: djasper
Date: Fri Jan 8 04:51:24 2016
New Revision: 257162
URL: http://llvm.org/viewvc/llvm-project?rev=257162&view=rev
Log:
clang-format: [JS] Prefer wrapping before the TypeScript return type
over wrapping before parameters.
Before:
function someFunc(
args: string[]): {longRetu
Author: djasper
Date: Sat Jan 9 09:56:28 2016
New Revision: 257255
URL: http://llvm.org/viewvc/llvm-project?rev=257255&view=rev
Log:
clang-format: [JS] Support semicolons in TypeScript's TypeMemberLists.
Before:
var x: {
a: string;
b: number;
}
= {};
After:
var x: {a: string; b:
Author: djasper
Date: Sat Jan 9 09:56:40 2016
New Revision: 257256
URL: http://llvm.org/viewvc/llvm-project?rev=257256&view=rev
Log:
clang-format: Support definitions/declarations of operator,.
Before:
bool operator, ();
After:
bool operator,();
Modified:
cfe/trunk/lib/Format/Continuat
Author: djasper
Date: Sat Jan 9 09:56:53 2016
New Revision: 257258
URL: http://llvm.org/viewvc/llvm-project?rev=257258&view=rev
Log:
clang-format: Improve selective comment formatting.
Starting here:
int x; // Format this line only.
int xx; //
int x; //
Before:
int x; // Format
Author: djasper
Date: Sat Jan 9 09:56:47 2016
New Revision: 257257
URL: http://llvm.org/viewvc/llvm-project?rev=257257&view=rev
Log:
clang-format: Fix incorrect line break in certain configurations.
Before:
void aa(,
vector
Author: djasper
Date: Sat Jan 9 09:56:57 2016
New Revision: 257259
URL: http://llvm.org/viewvc/llvm-project?rev=257259&view=rev
Log:
Make clang::format::reformat work with non 0-terminated strings.
Modified:
cfe/trunk/lib/Format/Format.cpp
Modified: cfe/trunk/lib/Format/Format.cpp
URL:
htt
Author: djasper
Date: Sat Jan 9 15:12:45 2016
New Revision: 257267
URL: http://llvm.org/viewvc/llvm-project?rev=257267&view=rev
Log:
clang-format: Fix the counting of leading whitespace in tok::unknown tokens
Previously, all whitespace characters would increase the starting
column, which doesn't
Author: djasper
Date: Mon Jan 11 05:01:05 2016
New Revision: 257325
URL: http://llvm.org/viewvc/llvm-project?rev=257325&view=rev
Log:
clang-format: Slightly row back on r257257.
r257257 change the way clang-format enforces line breaks after a
templated type has been line-wrapped. This was to fix
Author: djasper
Date: Mon Jan 11 05:00:58 2016
New Revision: 257324
URL: http://llvm.org/viewvc/llvm-project?rev=257324&view=rev
Log:
clang-format: [JS] Improve line-flow when calling functions on array literals.
Before:
return [
aa
].aaa(function() {
//
})
Author: djasper
Date: Mon Jan 11 06:55:33 2016
New Revision: 257330
URL: http://llvm.org/viewvc/llvm-project?rev=257330&view=rev
Log:
clang-format: Fix overloading "operator," definitions more thoroughly.
Before:
aa operator,(a &
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.h:145
@@ +144,3 @@
+// comment.
+bool IsTrailingCommentContinuation;
+
I find the term "continuation" a bit confusing here. How about something like
"IsInsideToken"?
http://reviews.
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.h:145
@@ +144,3 @@
+// comment.
+bool IsTrailingCommentContinuation;
+
klimek wrote:
> djasper wrote:
> > I find the term "continuation" a bit confusing here. How about something
> >
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
I think this looks good, but I'd also like Manuel to take a look.
http://reviews.llvm.org/D16058
___
cfe-commits mailing list
cfe-commits@lists
Author: djasper
Date: Mon Jan 11 16:57:40 2016
New Revision: 257406
URL: http://llvm.org/viewvc/llvm-project?rev=257406&view=rev
Log:
clang-format: [JS] Teach clang-format about "export interface".
Modified:
cfe/trunk/lib/Format/UnwrappedLineParser.cpp
cfe/trunk/unittests/Format/FormatTes
Author: djasper
Date: Tue Jan 12 00:24:38 2016
New Revision: 257451
URL: http://llvm.org/viewvc/llvm-project?rev=257451&view=rev
Log:
clang-format: [JS] Support exporting abstract classes.
Before:
export abstract class X {y: number;}
(and all sorts of other havoc in more complicated cases).
Af
djasper added inline comments.
Comment at: lib/Format/ContinuationIndenter.h:35
@@ -34,1 +34,3 @@
+/// \brief Helper class for breaking a logical line into multiple physical
+/// lines. Manages moving state from one physical line to the next.
You are the first
Author: djasper
Date: Wed Jan 13 10:41:34 2016
New Revision: 257615
URL: http://llvm.org/viewvc/llvm-project?rev=257615&view=rev
Log:
clang-format: [ObjC+JS] Allow bin-packing of array literals.
After reading the style guides again, they don't actually say how to
pack or not pack array literals.
Author: djasper
Date: Wed Jan 13 23:37:52 2016
New Revision: 257741
URL: http://llvm.org/viewvc/llvm-project?rev=257741&view=rev
Log:
clang-format: [JS] Fix incorrect line break leading to semicolon insertion.
clang-format only works for JavaScript code, if all the semicolons are
present anyway,
Author: djasper
Date: Thu Jan 14 07:36:46 2016
New Revision: 257763
URL: http://llvm.org/viewvc/llvm-project?rev=257763&view=rev
Log:
clang-format: Fix incorrectly enforced linebreak with ColumnLimit 0.
Before:
[]
.();
After:
[].();
Modified:
cfe/trunk/lib/
Author: djasper
Date: Wed Jan 20 12:55:57 2016
New Revision: 258328
URL: http://llvm.org/viewvc/llvm-project?rev=258328&view=rev
Log:
clang-format-diff: Replace hard-code default for clang-format binary with flag.
Patch by Kwasi Mensah, thank you.
Modified:
cfe/trunk/tools/clang-format/clang
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good. Submitted as r258328.
Repository:
rL LLVM
http://reviews.llvm.org/D16363
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
djasper added a comment.
Is there a coding style that actually recommends this? I would be quite
doubtful that it is a good idea as it makes those loops harder to distinguish
from other while loops. Generally, there is a certain bar to getting additional
style flags into clang-format:
http://cl
djasper added a comment.
Feel free to leave this patch around. Maybe somebody else comes up with
something that meets the other criteria ;-).
Me personally, I just think that seeing "while (1);" on a single line is quite
misleading. But maybe that is just me.
http://reviews.llvm.org/D16066
Author: djasper
Date: Wed Jan 27 14:14:23 2016
New Revision: 258981
URL: http://llvm.org/viewvc/llvm-project?rev=258981&view=rev
Log:
clang-format: [Java] Remove unnecessary line break after complex annotations
Before:
@Annotation("Some"
+ " text")
List
list;
After:
@Annotation
djasper added a comment.
Please read
http://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options
http://reviews.llvm.org/D16765
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailma
Author: djasper
Date: Mon Feb 1 05:21:02 2016
New Revision: 259352
URL: http://llvm.org/viewvc/llvm-project?rev=259352&view=rev
Log:
clang-format: Add option to disable string literal formatting.
Modified:
cfe/trunk/include/clang/Format/Format.h
cfe/trunk/lib/Format/ContinuationIndenter.
Author: djasper
Date: Mon Nov 16 06:38:56 2015
New Revision: 253202
URL: http://llvm.org/viewvc/llvm-project?rev=253202&view=rev
Log:
clang-format: Enable #include sorting by default.
This has seen quite some usage and I am not aware of any issues. Also
add a style option to enable/disable includ
his be a per-style default? It still only doesn't break webkit
>> files only by accident, right?
>>
>> On Mon, Nov 16, 2015 at 10:35 AM, Eric Christopher via cfe-commits <
>> cfe-commits@lists.llvm.org> wrote:
>>
>>> !!!
>>>
>>>
Author: djasper
Date: Fri Nov 20 08:32:54 2015
New Revision: 253667
URL: http://llvm.org/viewvc/llvm-project?rev=253667&view=rev
Log:
clang-format: [Proto] Support extending message.
Before:
extend.foo.Bar {
}
After:
extend .foo.Bar {
}
Modified:
cfe/trunk/lib/Format/FormatToken.h
Author: djasper
Date: Fri Nov 20 09:26:50 2015
New Revision: 253669
URL: http://llvm.org/viewvc/llvm-project?rev=253669&view=rev
Log:
clang-format: Don't use incorrect space in macro calls with operators.
Before:
MACRO(> );
After:
MACRO(>);
Not overly important, but easy and good for symmet
Author: djasper
Date: Fri Nov 20 09:58:50 2015
New Revision: 253671
URL: http://llvm.org/viewvc/llvm-project?rev=253671&view=rev
Log:
clang-format: [JS] struct and union aren't keywords / reserved words.
Modified:
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/unittests/Format/FormatTestJS.cpp
Author: djasper
Date: Fri Nov 20 10:18:42 2015
New Revision: 253672
URL: http://llvm.org/viewvc/llvm-project?rev=253672&view=rev
Log:
clang-format: [JS] Properly add a space after "in" in for loops.
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unittests/Format/FormatTestJS.
Author: djasper
Date: Fri Nov 20 10:44:28 2015
New Revision: 253674
URL: http://llvm.org/viewvc/llvm-project?rev=253674&view=rev
Log:
clang-format: [JS] Make AllowShortFunctionsOnASingle line value "Empty"
work properly.
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unittest
Author: djasper
Date: Sat Nov 21 03:17:08 2015
New Revision: 253772
URL: http://llvm.org/viewvc/llvm-project?rev=253772&view=rev
Log:
clang-format: Make sorting includes respect // clang-format off
Modified:
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/unittests/Format/SortIncludesTest.cpp
Author: djasper
Date: Mon Nov 23 02:33:48 2015
New Revision: 253859
URL: http://llvm.org/viewvc/llvm-project?rev=253859&view=rev
Log:
Fix calculation of shifted cursor/code positions. Specifically support
the case where a specific range is replaced by new text. Previously,
the calculation would sh
Author: djasper
Date: Mon Nov 23 02:36:35 2015
New Revision: 253860
URL: http://llvm.org/viewvc/llvm-project?rev=253860&view=rev
Log:
clang-format: Make moving of the Cursor work properly when sorting #includes.
Modified:
cfe/trunk/include/clang/Format/Format.h
cfe/trunk/lib/Format/Format
Author: djasper
Date: Mon Nov 23 02:50:52 2015
New Revision: 253861
URL: http://llvm.org/viewvc/llvm-project?rev=253861&view=rev
Log:
Fix clang-format test. I believe that the new behavior is better.
Modified:
cfe/trunk/test/Format/cursor.cpp
Modified: cfe/trunk/test/Format/cursor.cpp
URL:
Seen and fixed, I think..
On Nov 23, 2015 10:32 AM, "Renato Golin" wrote:
> On 23 November 2015 at 08:33, Daniel Jasper via cfe-commits
> wrote:
> > Author: djasper
> > Date: Mon Nov 23 02:33:48 2015
> > New Revision: 253859
> >
> > URL: http://ll
djasper added a subscriber: djasper.
djasper added a comment.
This has come up before (read up on the list) and the decision is not to
support it. In short, this is so un-important, that it is not worth a
configuration option.
http://reviews.llvm.org/D14927
_
Author: djasper
Date: Mon Nov 23 09:55:45 2015
New Revision: 253871
URL: http://llvm.org/viewvc/llvm-project?rev=253871&view=rev
Log:
clang-format: If the template list of a variable declaration spans
multiple lines, also break before the variable name.
Before:
std::vector aaa;
After:
std::v
Author: djasper
Date: Mon Nov 23 09:55:55 2015
New Revision: 253873
URL: http://llvm.org/viewvc/llvm-project?rev=253873&view=rev
Log:
clang-format: Signficantly refactor the cast detection.
No functional changes intended.
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
Modified: cfe/trunk
Author: djasper
Date: Mon Nov 23 09:55:50 2015
New Revision: 253872
URL: http://llvm.org/viewvc/llvm-project?rev=253872&view=rev
Log:
clang-format: Fix incorrect cast detection.
Before:
bool b = f(g)&&c;
After:
bool b = f(g) && c;
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cf
Author: djasper
Date: Mon Nov 23 13:11:45 2015
New Revision: 253900
URL: http://llvm.org/viewvc/llvm-project?rev=253900&view=rev
Log:
clang-format: Re-add code path deleted in r253873 and add missing test.
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unittests/Format/Format
Oh, that is a different one. Looking into it.
On Mon, Nov 23, 2015 at 9:14 PM, Renato Golin
wrote:
> On 23 November 2015 at 10:41, Daniel Jasper wrote:
> > Seen and fixed, I think..
>
> Still looks broken... :)
>
> http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/7684
>
> http:
Author: djasper
Date: Mon Nov 23 16:28:56 2015
New Revision: 253929
URL: http://llvm.org/viewvc/llvm-project?rev=253929&view=rev
Log:
Fix test failure introduced by r253859. I believe that the new behavior
in r253859 makes sense in many cases and thus, I have fixed the
implementation of calculateC
Fixed in r253929.
On Mon, Nov 23, 2015 at 10:59 PM, Daniel Jasper wrote:
> Oh, that is a different one. Looking into it.
>
>
> On Mon, Nov 23, 2015 at 9:14 PM, Renato Golin
> wrote:
>
>> On 23 November 2015 at 10:41, Daniel Jasper wrote:
>> > Seen and fixed, I think..
>>
>> Still looks broken.
djasper added a comment.
Sorry for being so slow to respond. Feel free to ping me more frequently ;-).
Comment at: lib/Format/WhitespaceManager.cpp:197
@@ +196,3 @@
+ // Keep track of the scope depth of matching tokens. We will only align a
+ // sequence of matching token that
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:197
@@ +196,3 @@
+ // Keep track of the nesting level of matching tokens, i.e. the number of
+ // surrounding (), [], or {}. We will only align a sequence of matching
+ // token that share the same scop
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks awesome :-)
Comment at: lib/Format/WhitespaceManager.cpp:242-243
@@ -320,34 +241,4 @@
}
-if (Changes[i].Kind == tok::r_brace) {
- if (!FoundLeftBraceOn
Author: djasper
Date: Tue Dec 1 06:00:43 2015
New Revision: 254406
URL: http://llvm.org/viewvc/llvm-project?rev=254406&view=rev
Log:
This fixes https://llvm.org/bugs/show_bug.cgi?id=25329, as well as
misalignments like the following:
int a, b = 2;
int c= 3;
Patch by Beren Minor, thanks!
djasper closed this revision.
djasper added a comment.
Submitted as r254406.
Note that I had to make the struct "Change" public. How did this compile on
your end?
http://reviews.llvm.org/D14325
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
Author: djasper
Date: Tue Dec 1 06:05:04 2015
New Revision: 254407
URL: http://llvm.org/viewvc/llvm-project?rev=254407&view=rev
Log:
clang-format: treat Q_SIGNALS as an access modifier
Patch by Alexander Richardson, thank you!
Modified:
cfe/trunk/lib/Format/FormatToken.h
cfe/trunk/lib/F
Author: djasper
Date: Tue Dec 1 07:28:53 2015
New Revision: 254414
URL: http://llvm.org/viewvc/llvm-project?rev=254414&view=rev
Log:
clang-format: Make it possible to turn off comment reflowing.
Modified:
cfe/trunk/include/clang/Format/Format.h
cfe/trunk/lib/Format/ContinuationIndenter.c
djasper created this revision.
djasper added a reviewer: klimek.
djasper added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
http://reviews.llvm.org/D15149
Files:
include/clang/AST/RecursiveASTVisitor.h
unittests/ASTMatchers/ASTMatchersTest.cpp
Index: unittests/ASTMatchers/AS
601 - 700 of 731 matches
Mail list logo