r263470 - clang-format: [JS] Handle certain cases of ASI.

2016-03-14 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D17910: clang-format: [JS] Handle certain cases of ASI.

2016-03-14 Thread Daniel Jasper via cfe-commits
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

r263710 - clang-format: [JS] Fix incorrect spacing around contextual keywords.

2016-03-18 Thread Daniel Jasper via cfe-commits
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

r263709 - clang-format: Slightly weaken AlignAfterOpenBracket=AlwaysBreak.

2016-03-19 Thread Daniel Jasper via cfe-commits
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

r263713 - clang-format: [JS] Make requoting of JavaScript string literals only

2016-03-19 Thread Daniel Jasper via cfe-commits
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/

[PATCH] D18313: clang-format: Make include sorting's main include detection configurable.

2016-03-21 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D18313: clang-format: Make include sorting's main include detection configurable.

2016-03-21 Thread Daniel Jasper via cfe-commits
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 ==

Re: [PATCH] D18294: clang-format: [JS] no space in union and intersection types.

2016-03-21 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D18313: clang-format: Make include sorting's main include detection configurable.

2016-03-21 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-21 Thread Daniel Jasper via cfe-commits
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

r263943 - clang-format: Make include sorting's main include detection configurable.

2016-03-21 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D18294: clang-format: [JS] no space in union and intersection types.

2016-03-21 Thread Daniel Jasper via cfe-commits
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

r263961 - clang-format: [JS] no space in union and intersection types.

2016-03-21 Thread Daniel Jasper via 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

Re: [PATCH] D18294: clang-format: [JS] no space in union and intersection types.

2016-03-21 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D17440: clang-format: [JS] do not wrap ES6 imports/exports.

2016-03-22 Thread Daniel Jasper via 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 --

Re: [PATCH] D17440: clang-format: [JS] do not wrap ES6 imports/exports.

2016-03-22 Thread Daniel Jasper via cfe-commits
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.

r264055 - clang-format: [JS] do not wrap ES6 imports/exports.

2016-03-22 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D17440: clang-format: [JS] do not wrap ES6 imports/exports.

2016-03-22 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D18432: Test commit access to clang repo.

2016-03-24 Thread Daniel Jasper via 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

Re: r263709 - clang-format: Slightly weaken AlignAfterOpenBracket=AlwaysBreak.

2016-03-24 Thread Daniel Jasper via cfe-commits
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>: >

Re: r263709 - clang-format: Slightly weaken AlignAfterOpenBracket=AlwaysBreak.

2016-03-28 Thread Daniel Jasper via cfe-commits
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

Re: r263709 - clang-format: Slightly weaken AlignAfterOpenBracket=AlwaysBreak.

2016-03-28 Thread Daniel Jasper via cfe-commits
nsp::nmspc::nmspace::Value01, >>> nsp::nmspc::nmspace::Value002 ) ), >>> extraArg001 ) ); >>> >>> boost::scoped_ptr< Type01 > obj002( >>> new Type01( nsp::nmspc::TypeInfo001Ptr( new >>> nsp::nms

r256546 - clang-format: [JS/TypeScript] Support "enum" as property name.

2015-12-29 Thread Daniel Jasper via cfe-commits
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

r256631 - clang-format: [JS] Support TypeScript 1.6 user defined type guards.

2015-12-30 Thread Daniel Jasper via cfe-commits
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

r256640 - clang-format: Slightly row back on r256343 by increasing penalty for

2015-12-30 Thread Daniel Jasper via cfe-commits
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

r256736 - clang-format: [Proto] Improve wrapping of message field attributes.

2016-01-03 Thread Daniel Jasper via cfe-commits
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 = {

r256737 - clang-format: [Proto] Basic support for options with <> for repeated fields.

2016-01-03 Thread Daniel Jasper via cfe-commits
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

r256738 - clang-format: Fix corner-case in ObjC method declaration formatting

2016-01-03 Thread Daniel Jasper via cfe-commits
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

r256739 - clang-format: Fix corner case for lambda assignments.

2016-01-03 Thread Daniel Jasper via cfe-commits
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

r256740 - clang-format: Align long braced init lists even if they are nested in

2016-01-03 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D15266: [clang-format] Handle \n the same way as std::endl with stream operator.

2016-01-04 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D14484: Formatting constructor initializer lists by putting them always on different lines

2016-01-04 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D14484: Formatting constructor initializer lists by putting them always on different lines

2016-01-04 Thread Daniel Jasper via cfe-commits
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

r256750 - clang-format: Fix corner case in builder-type call formatting.

2016-01-04 Thread Daniel Jasper via cfe-commits
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,

r256753 - clang-format: [JS] Improve empty array literal detection.

2016-01-04 Thread Daniel Jasper via cfe-commits
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

r256758 - clang-format: [JS] Support ES6 exports of array literals.

2016-01-04 Thread Daniel Jasper via cfe-commits
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

r256759 - clang-format: [JS] Support more ES6 default exports.

2016-01-04 Thread Daniel Jasper via cfe-commits
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

r256830 - clang-format: Improve line wrapping behavior in call sequences.

2016-01-05 Thread Daniel Jasper via cfe-commits
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

r256831 - clang-format: Avoid creating hanging indents in call sequences.

2016-01-05 Thread Daniel Jasper via cfe-commits
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( )

r256832 - clang-format: Handle \n the same way as std::endl with stream operator.

2016-01-05 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D15266: [clang-format] Handle \n the same way as std::endl with stream operator.

2016-01-05 Thread Daniel Jasper via cfe-commits
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

r256841 - clang-format: Fix corner case in "if it saves columns"-calculation.

2016-01-05 Thread Daniel Jasper via 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

r257057 - Add missing -no-canonical-prefixes.

2016-01-07 Thread Daniel Jasper via cfe-commits
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

r257062 - clang-format: Support weird lambda macros.

2016-01-07 Thread Daniel Jasper via cfe-commits
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

r257154 - clang-format: [JS] Support more ES6 classes.

2016-01-07 Thread Daniel Jasper via cfe-commits
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:

r257159 - clang-format: [JS] Add some Closure Compiler JSDoc tags to the default

2016-01-08 Thread Daniel Jasper via cfe-commits
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

r257162 - clang-format: [JS] Prefer wrapping before the TypeScript return type

2016-01-08 Thread Daniel Jasper via cfe-commits
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

r257255 - clang-format: [JS] Support semicolons in TypeScript's TypeMemberLists.

2016-01-09 Thread Daniel Jasper via cfe-commits
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:

r257256 - clang-format: Support definitions/declarations of operator, .

2016-01-09 Thread Daniel Jasper via cfe-commits
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

r257258 - clang-format: Improve selective comment formatting.

2016-01-09 Thread Daniel Jasper via cfe-commits
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

r257257 - clang-format: Fix incorrect line break in certain configurations.

2016-01-09 Thread Daniel Jasper via cfe-commits
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

r257259 - Make clang::format::reformat work with non 0-terminated strings.

2016-01-09 Thread Daniel Jasper via cfe-commits
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

r257267 - clang-format: Fix the counting of leading whitespace in tok::unknown tokens

2016-01-09 Thread Daniel Jasper via cfe-commits
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

r257325 - clang-format: Slightly row back on r257257.

2016-01-11 Thread Daniel Jasper via cfe-commits
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

r257324 - clang-format: [JS] Improve line-flow when calling functions on array literals.

2016-01-11 Thread Daniel Jasper via cfe-commits
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() { // })

r257330 - clang-format: Fix overloading "operator, " definitions more thoroughly.

2016-01-11 Thread Daniel Jasper via cfe-commits
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 &

Re: [PATCH] D16058: [clang-format] Fix comment aligning when there are changes within the comment

2016-01-11 Thread Daniel Jasper via cfe-commits
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.

Re: [PATCH] D16058: [clang-format] Fix comment aligning when there are changes within the comment

2016-01-11 Thread Daniel Jasper via cfe-commits
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 > >

Re: [PATCH] D16058: [clang-format] Fix comment aligning when there are changes within the comment

2016-01-11 Thread Daniel Jasper via cfe-commits
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

r257406 - clang-format: [JS] Teach clang-format about "export interface".

2016-01-11 Thread Daniel Jasper via cfe-commits
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

r257451 - clang-format: [JS] Support exporting abstract classes.

2016-01-11 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D16087: Add some overview doxygen comments to lib/Format.

2016-01-12 Thread Daniel Jasper via cfe-commits
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

r257615 - clang-format: [ObjC+JS] Allow bin-packing of array literals.

2016-01-13 Thread Daniel Jasper via cfe-commits
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.

r257741 - clang-format: [JS] Fix incorrect line break leading to semicolon insertion.

2016-01-13 Thread Daniel Jasper via cfe-commits
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,

r257763 - clang-format: Fix incorrectly enforced linebreak with ColumnLimit 0.

2016-01-14 Thread Daniel Jasper via cfe-commits
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/

r258328 - clang-format-diff: Replace hard-code default for clang-format binary with flag.

2016-01-20 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D16363: Add option to specify clang-format binary for clang-format-diff

2016-01-20 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D16066: [clang-format] Add BeforeWhileInDoWhile BraceWrapping option

2016-01-26 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D16066: [clang-format] Add BeforeWhileInDoWhile BraceWrapping option

2016-01-26 Thread Daniel Jasper via cfe-commits
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

r258981 - clang-format: [Java] Remove unnecessary line break after complex annotations

2016-01-27 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D16765: [Clang-Format] Add option for spacing between function parameters

2016-02-01 Thread Daniel Jasper via cfe-commits
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

r259352 - clang-format: Add option to disable string literal formatting.

2016-02-01 Thread Daniel Jasper via cfe-commits
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.

r253202 - clang-format: Enable #include sorting by default.

2015-11-16 Thread Daniel Jasper via cfe-commits
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

Re: r253202 - clang-format: Enable #include sorting by default.

2015-11-16 Thread Daniel Jasper via cfe-commits
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: >> >>> !!! >>> >>>

r253667 - clang-format: [Proto] Support extending message.

2015-11-20 Thread Daniel Jasper via cfe-commits
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

r253669 - clang-format: Don't use incorrect space in macro calls with operators.

2015-11-20 Thread Daniel Jasper via cfe-commits
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

r253671 - clang-format: [JS] struct and union aren't keywords / reserved words.

2015-11-20 Thread Daniel Jasper via cfe-commits
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

r253672 - clang-format: [JS] Properly add a space after "in" in for loops.

2015-11-20 Thread Daniel Jasper via cfe-commits
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.

r253674 - clang-format: [JS] Make AllowShortFunctionsOnASingle line value "Empty"

2015-11-20 Thread Daniel Jasper via cfe-commits
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

r253772 - clang-format: Make sorting includes respect // clang-format off

2015-11-21 Thread Daniel Jasper via cfe-commits
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

r253859 - Fix calculation of shifted cursor/code positions. Specifically support

2015-11-23 Thread Daniel Jasper via cfe-commits
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

r253860 - clang-format: Make moving of the Cursor work properly when sorting #includes.

2015-11-23 Thread Daniel Jasper via cfe-commits
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

r253861 - Fix clang-format test. I believe that the new behavior is better.

2015-11-23 Thread Daniel Jasper via cfe-commits
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:

Re: r253859 - Fix calculation of shifted cursor/code positions. Specifically support

2015-11-23 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D14927: clang-format: Add SpaceBeforeTemplateParameterList option

2015-11-23 Thread Daniel Jasper via cfe-commits
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 _

r253871 - clang-format: If the template list of a variable declaration spans

2015-11-23 Thread Daniel Jasper via cfe-commits
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

r253873 - clang-format: Signficantly refactor the cast detection.

2015-11-23 Thread Daniel Jasper via cfe-commits
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

r253872 - clang-format: Fix incorrect cast detection.

2015-11-23 Thread Daniel Jasper via cfe-commits
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

r253900 - clang-format: Re-add code path deleted in r253873 and add missing test.

2015-11-23 Thread Daniel Jasper via cfe-commits
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

Re: r253859 - Fix calculation of shifted cursor/code positions. Specifically support

2015-11-23 Thread Daniel Jasper via cfe-commits
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:

[clang-tools-extra] r253929 - Fix test failure introduced by r253859. I believe that the new behavior

2015-11-23 Thread Daniel Jasper via cfe-commits
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

Re: r253859 - Fix calculation of shifted cursor/code positions. Specifically support

2015-11-23 Thread Daniel Jasper via cfe-commits
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.

Re: [PATCH] D14325: [clang-format] Do not align assignments that aren't after the same number of commas. (Closes: 25329)

2015-11-27 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D14325: [clang-format] Do not align assignments that aren't after the same number of commas. (Closes: 25329)

2015-11-27 Thread Daniel Jasper via cfe-commits
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

Re: [PATCH] D14325: [clang-format] Do not align assignments that aren't after the same number of commas. (Closes: 25329)

2015-11-27 Thread Daniel Jasper via cfe-commits
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

r254406 - This fixes https://llvm.org/bugs/show_bug.cgi?id=25329, as well as

2015-12-01 Thread Daniel Jasper via cfe-commits
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!

Re: [PATCH] D14325: [clang-format] Do not align assignments that aren't after the same number of commas. (Closes: 25329)

2015-12-01 Thread Daniel Jasper via cfe-commits
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

r254407 - clang-format: treat Q_SIGNALS as an access modifier

2015-12-01 Thread Daniel Jasper via cfe-commits
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

r254414 - clang-format: Make it possible to turn off comment reflowing.

2015-12-01 Thread Daniel Jasper via cfe-commits
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

[PATCH] D15149: Traverse the nested name specifier (loc) of namespace alias declarations.

2015-12-02 Thread Daniel Jasper via cfe-commits
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

<    2   3   4   5   6   7   8   >