r285673 - clang-format: Fix incorrect pointer detection.

2016-10-31 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 1 01:23:14 2016 New Revision: 285673 URL: http://llvm.org/viewvc/llvm-project?rev=285673&view=rev Log: clang-format: Fix incorrect pointer detection. Before: void f() { f(float{1}, a *a); } After: void f() { f(float{1}, a * a); } Modified: cfe/trunk/lib/Fo

[PATCH] D26125: [clang-tidy] Fixed readability-else-after-return for cascade statements

2016-11-01 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. Thanks for fixing this! https://reviews.llvm.org/D26125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

r286041 - clang-format: Better support for CUDA's triple brackets.

2016-11-05 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Sat Nov 5 12:43:16 2016 New Revision: 286041 URL: http://llvm.org/viewvc/llvm-project?rev=286041&view=rev Log: clang-format: Better support for CUDA's triple brackets. Before: aaa< a, aa, aa><<>>(); After: aaa

[PATCH] D6833: Clang-format: Braces Indent Style Whitesmith

2016-11-05 Thread Daniel Jasper via cfe-commits
djasper added a comment. In case you still want to move forward with this, some more comments. Why have you opted for doing this in getNewLineColumn instead of the UnwrappedLineFormatter::formatFirstToken() function I suggested? I think the latter would be way easier, but there might be cases I

r286243 - [clang-format] Remove (SourceManager, FileID) variants

2016-11-08 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 8 10:11:33 2016 New Revision: 286243 URL: http://llvm.org/viewvc/llvm-project?rev=286243&view=rev Log: [clang-format] Remove (SourceManager, FileID) variants In Format, remove the reformat() and clean() functions taking a SourceManager and a FileID. Keep the version

r286262 - Remove now unnecessary FormatRewriterContext.

2016-11-08 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 8 12:29:19 2016 New Revision: 286262 URL: http://llvm.org/viewvc/llvm-project?rev=286262&view=rev Log: Remove now unnecessary FormatRewriterContext. Modified: cfe/trunk/lib/Index/CommentToXML.cpp Modified: cfe/trunk/lib/Index/CommentToXML.cpp URL: http://llvm.

r286264 - Revert "Remove now unnecessary FormatRewriterContext."

2016-11-08 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 8 12:30:52 2016 New Revision: 286264 URL: http://llvm.org/viewvc/llvm-project?rev=286264&view=rev Log: Revert "Remove now unnecessary FormatRewriterContext." This reverts commit r286262. I accidentally committed it without all of the changes. Modified: cfe/trun

r286279 - Remove FormatContext from libClang as it is now unused.

2016-11-08 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 8 13:47:19 2016 New Revision: 286279 URL: http://llvm.org/viewvc/llvm-project?rev=286279&view=rev Log: Remove FormatContext from libClang as it is now unused. Modified: cfe/trunk/include/clang/Index/CommentToXML.h cfe/trunk/lib/Index/CommentToXML.cpp Modifi

Re: r286243 - [clang-format] Remove (SourceManager, FileID) variants

2016-11-08 Thread Daniel Jasper via cfe-commits
Galina > > On Tue, Nov 8, 2016 at 8:11 AM, Daniel Jasper via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: djasper >> Date: Tue Nov 8 10:11:33 2016 >> New Revision: 286243 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=286

r286367 - clang-format: [TypeScript] Fix bug in handling of non-null operator.

2016-11-09 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Nov 9 08:12:55 2016 New Revision: 286367 URL: http://llvm.org/viewvc/llvm-project?rev=286367&view=rev Log: clang-format: [TypeScript] Fix bug in handling of non-null operator. Before: var i = x!-1; After: var i = x! - 1; Modified: cfe/trunk/lib/Format/TokenAnn

[PATCH] D26163: [clang-format] Fix PR30527: Regression when clang-format insert spaces in [] when in template

2016-11-10 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. Thank you! https://reviews.llvm.org/D26163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D26274: clang-format: [JS] do not break after declare namespace.

2016-11-10 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. https://reviews.llvm.org/D26274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

r286715 - clang-format: Support ObjC selectors with unnamed parameters.

2016-11-11 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Sat Nov 12 01:38:22 2016 New Revision: 286715 URL: http://llvm.org/viewvc/llvm-project?rev=286715&view=rev Log: clang-format: Support ObjC selectors with unnamed parameters. This fixes llvm.org/PR28063. Modified: cfe/trunk/lib/Format/ContinuationIndenter.cpp cfe/tru

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-14 Thread Daniel Jasper via cfe-commits
djasper added a comment. Ping? http://reviews.llvm.org/D11240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
So, back in the day when we implemented the matchers, we decided on actually wanting to remove all the CXX... AST nodes (there are more of them). I don't know how this would work as recordDecl already exists. But I'd be somewhat hesitant to introduce a cxxRecordDecl matcher if there is still a chan

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
On Mon, Sep 14, 2015 at 7:24 PM, Manuel Klimek wrote: > On Mon, Sep 14, 2015 at 10:21 AM Daniel Jasper wrote: > >> So, back in the day when we implemented the matchers, we decided on >> actually wanting to remove all the CXX... AST nodes (there are more of >> them). >> > > Note that Richard has

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
By this point, I see that change might be profitable overall. However, lets completely map this out. Changing just cxxRecordDecl() can actually increase confusion in other areas. Right now, not a single AST matcher has the cxx prefix (although a total of 28 stand for the corresponding CXX.. AST nod

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
Ok. I am happy with this then. (Just personally grumpy having to write cxxRecordDecl(has(cxxConstructorDecl(..))) in the future ;-) ). On Mon, Sep 14, 2015 at 11:41 PM, Manuel Klimek wrote: > > > On Mon, Sep 14, 2015 at 2:29 PM Aaron Ballman > wrote: > >> On Mon, Sep 14, 2015 at 4:38 PM, Manue

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
Btw, I think generating them, potentially into several different headers to work around the compile time issue isn't such a bad idea. On Mon, Sep 14, 2015 at 11:45 PM, Manuel Klimek wrote: > Feel free to rename the AST nodes :) > > On Mon, Sep 14, 2015, 2:44 PM Daniel Jasper wrote: > >> Ok. I a

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-15 Thread Daniel Jasper via cfe-commits
djasper marked 8 inline comments as done. Comment at: lib/Format/Format.cpp:1653 @@ +1652,3 @@ +Code.substr(Prev, (Pos != StringRef::npos ? Pos : Code.size()) - Prev); +if (!Line.endswith("\\")) { + if (IncludeRegex.match(Line, &Matches)) { klimek

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-15 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 34800. djasper marked 4 inline comments as done. djasper added a comment. Addressed (most) comments http://reviews.llvm.org/D11240 Files: include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h lib/Format/Format.cpp lib/Format/FormatT

Re: [PATCH] D12921: clang-format: Support 'template<>' (no space).

2015-09-16 Thread Daniel Jasper via cfe-commits
djasper added a comment. This has come up before and the decision was that this is not important enough to meet the bar for an additional clang-format option. clang-format options have a certain cost and this specific space is so entirely unimportant that we don't want to pay it. We have tried

Re: [PATCH] D12921: clang-format: Support 'template<>' (no space).

2015-09-17 Thread Daniel Jasper via cfe-commits
The most important costs are: Maintenance and discoverability of options. The point here that it this space is utterly irrelevant, it doesn't make a readability difference ever. Most codebases are inconsistent about it anyway and I haven't seen a style guide even talking about this. We never inte

Re: [PATCH] D10370: clang-format: Implement AlwaysBreakAfterDeclarationReturnType.

2015-09-17 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: docs/ClangFormatStyleOptions.rst:221-235 @@ -220,3 +220,17 @@ -**AlwaysBreakAfterDefinitionReturnType** (``DefinitionReturnTypeBreakingStyle``) +**AlwaysBreakAfterDeclarationReturnType** (``ReturnTypeBreakingStyle``) + The function de

Re: [PATCH] D12492: [Clang-Format] Add AlwaysBreakBeforeElse and AlwaysBreakBeforeCatch Style to avoid cuddled else/catch

2015-09-17 Thread Daniel Jasper via cfe-commits
djasper added a comment. Please upload a patch with full file context. Comment at: docs/ClangFormatStyleOptions.rst:247 @@ -246,1 +246,3 @@ +**AlwaysBreakBeforeElse** (``bool``) + If ``true``, always break before ``else``. Hm, I think these should be grouped

Re: [PATCH] D12492: [Clang-Format] Add AlwaysBreakBeforeElse and AlwaysBreakBeforeCatch Style to avoid cuddled else/catch

2015-09-17 Thread Daniel Jasper via cfe-commits
djasper added a subscriber: djasper. djasper added a comment. The question is how all the other options should be called and how we can group them nicely so that we don't flood the options configuration page too much. Maybe it's time for nesting in the configuration class? http://reviews.llvm.or

Re: [PATCH] D12492: [Clang-Format] Add AlwaysBreakBeforeElse and AlwaysBreakBeforeCatch Style to avoid cuddled else/catch

2015-09-17 Thread Daniel Jasper via cfe-commits
The question is how all the other options should be called and how we can group them nicely so that we don't flood the options configuration page too much. Maybe it's time for nesting in the configuration class? On Sep 17, 2015 11:50 AM, "Paul Hoad" wrote: > MyDeveloperDay added inline comments.

Re: [PATCH] D12921: clang-format: Support 'template<>' (no space).

2015-09-17 Thread Daniel Jasper via cfe-commits
On Thu, Sep 17, 2015 at 12:17 PM, Paul Hoad wrote: > MyDeveloperDay added a comment. > > > The point here that it this space is utterly irrelevant > > > So I totally take the point but if it doesn't matter then why does > clang-format automatically add one to my "template<>" why not simply leave

Re: [PATCH] D12501: [clang-format] Obj-C dictionary literals: Fixed typecast getting put on a separate line from the key

2015-09-17 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:377 @@ -376,1 +376,3 @@ +(!Contexts.back().ColonIsDictLiteral || + Style.Language != FormatStyle::LK_Cpp)) || Style.Language == FormatStyle::LK_Proto) && --

Re: [PATCH] D11693: clang-format: Support generalized lambda captures.

2015-09-17 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:1060-1061 @@ +1059,4 @@ + nextToken(); + while (!eof()) { +// FIXME: Once we have an expression parser in the UnwrappedLineParser, +// replace this by using parseAssigmentExpres

Re: [PATCH] D12921: clang-format: Support 'template<>' (no space).

2015-09-17 Thread Daniel Jasper via cfe-commits
Lets says this: I am not happy about it and wouldn't allow it if it was added now. However, *removing* it actually has additional costs, so I am not inclined to do so now. On Thu, Sep 17, 2015 at 9:52 PM, strager wrote: > strager added a comment. > > Should we remove `ObjCSpaceBeforeProtocolList

r248145 - clang-format: Fix merging short case labels with comments.

2015-09-21 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Sep 21 04:50:01 2015 New Revision: 248145 URL: http://llvm.org/viewvc/llvm-project?rev=248145&view=rev Log: clang-format: Fix merging short case labels with comments. This fixes llvm.org/PR24877. Patch by Benjamin Daly, thank you! Modified: cfe/trunk/lib/Format/Unw

Re: [PATCH] D10370: clang-format: Implement AlwaysBreakAfterDeclarationReturnType.

2015-09-21 Thread Daniel Jasper via cfe-commits
djasper added a comment. Maintenance is not about writing 7 lines of code correctly, but ensuring that all these options work correctly and in combination with all other options and that options remain discoverable and well documented. So, please change this to using the one enum with 5 configu

[clang-tools-extra] r248252 - misc-unused-parameter: Ignore lambda static invokers.

2015-09-22 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Sep 22 04:20:20 2015 New Revision: 248252 URL: http://llvm.org/viewvc/llvm-project?rev=248252&view=rev Log: misc-unused-parameter: Ignore lambda static invokers. Modified: clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.cpp clang-tools-extra/trunk/t

r248254 - clang-format: Fix alignConsecutiveAssignments.

2015-09-22 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Sep 22 04:32:00 2015 New Revision: 248254 URL: http://llvm.org/viewvc/llvm-project?rev=248254&view=rev Log: clang-format: Fix alignConsecutiveAssignments. It wasn't correctly handling this case: int oneTwoThree = 123; int oneTwo = 12; method(); Review: http:

Re: [PATCH] D12369: [clang-format] Fix alignConsecutiveAssignments not working properly

2015-09-22 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r248254, thank you! http://reviews.llvm.org/D12369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12501: [clang-format] Obj-C dictionary literals: Fixed typecast getting put on a separate line from the key

2015-09-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? Comment at: lib/Format/TokenAnnotator.cpp:377 @@ -376,1 +376,3 @@ +(!Contexts.back().ColonIsDictLiteral || +

Re: [PATCH] D12492: [Clang-Format] Add AlwaysBreakBeforeElse and AlwaysBreakBeforeCatch Style to avoid cuddled else/catch

2015-09-22 Thread Daniel Jasper via cfe-commits
djasper added a comment. If that's ok for you, I'd like to try and restructure the existing options first. I'll try to complete that this week. Will update this review once I am done. http://reviews.llvm.org/D12492 ___ cfe-commits mailing list cfe

Re: [PATCH] D11693: clang-format: Support generalized lambda captures.

2015-09-22 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:1064 @@ +1063,3 @@ +// parseBracedList. For now, parsing matching braces ([], (), {}) is +// good enough. +if (FormatTok->is(tok::l_paren)) { strager wrote: > dja

Re: [PATCH] D12489: [clang-format] Fixed missing space between Obj-C for/in and a typecast

2015-09-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? http://reviews.llvm.org/D12489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-22 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 35375. djasper added a comment. Restructured a bit. Not as many comments just yet. Do you think this is an improvement? http://reviews.llvm.org/D11240 Files: include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h lib/Format/Format.cpp

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-22 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 35395. djasper added a comment. Added comments and did some renaming. http://reviews.llvm.org/D11240 Files: include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h lib/Format/Format.cpp lib/Format/FormatToken.cpp lib/Tooling/Core/Re

r248367 - clang-format: Add initial #include sorting capabilities.

2015-09-23 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Sep 23 03:30:47 2015 New Revision: 248367 URL: http://llvm.org/viewvc/llvm-project?rev=248367&view=rev Log: clang-format: Add initial #include sorting capabilities. To implement this nicely, add a function that merges two sets of replacements that are meant to be done in

r248375 - Fix bad iterator access.

2015-09-23 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Sep 23 07:47:50 2015 New Revision: 248375 URL: http://llvm.org/viewvc/llvm-project?rev=248375&view=rev Log: Fix bad iterator access. Modified: cfe/trunk/lib/Tooling/Core/Replacement.cpp Modified: cfe/trunk/lib/Tooling/Core/Replacement.cpp URL: http://llvm.org/viewv

Re: [Diffusion] rL248367: clang-format: Add initial #include sorting capabilities.

2015-09-23 Thread Daniel Jasper via cfe-commits
Thank you. I think I have fixed the issue in r248375. On Wed, Sep 23, 2015 at 12:25 PM, NAKAMURA Takumi wrote: > chapuni added subscribers: cfe-commits, chapuni. > > /cfe/trunk/lib/Tooling/Core/Replacement.cpp:408 FirstI may be in the end() > when SecondI != end(). Then FirstI->getOffset() is in

[PATCH] D13210: Make brace styles more configurable

2015-09-28 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. Add individual brace flags for the different aspects of wrapping braces and make Allman, GNU, etc. just presets for them. This patch isn't complete yet, st

Re: [PATCH] D13211: clang-format: [JS] handle let (ES6).

2015-09-28 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. This revision is now accepted and ready to land. Comment at: lib/Format/TokenAnnotator.cpp:2087 @@ -2087,1 +2086,3 @@ +// above. +!Line.startsWith(Keywords.kw_var) && !Line.startsWith(Keywords.kw_let)) // Object literals on th

Re: [PATCH] D13213: clang-format: [JS] Support pseudo-keywords.

2015-09-28 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/D13213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

r248713 - clang-format: [JS] handle let (ES6)

2015-09-28 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Sep 28 09:28:08 2015 New Revision: 248713 URL: http://llvm.org/viewvc/llvm-project?rev=248713&view=rev Log: clang-format: [JS] handle let (ES6) Patch by Martin Probst. Thank you! Modified: cfe/trunk/lib/Format/FormatToken.h cfe/trunk/lib/Format/TokenAnnotator.cp

Re: [PATCH] D13211: clang-format: [JS] handle let (ES6).

2015-09-28 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r248713. http://reviews.llvm.org/D13211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r248714 - clang-format: [JS] Support pseudo-keywords

2015-09-28 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Sep 28 09:29:45 2015 New Revision: 248714 URL: http://llvm.org/viewvc/llvm-project?rev=248714&view=rev Log: clang-format: [JS] Support pseudo-keywords JavaScript allows keywords to appear in IdenfierName positions, e.g. fields, or object literal members, but not as plain

Re: [PATCH] D13213: clang-format: [JS] Support pseudo-keywords.

2015-09-28 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r248714. http://reviews.llvm.org/D13213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D13228: clang-format: Extend #include sorting functionality

2015-09-28 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. Recognize main module header as well as different #include categories. This should now mimic the behavior of llvm/utils/sort_includes.py as well as clang-t

Re: [PATCH] D13228: clang-format: Extend #include sorting functionality

2015-09-29 Thread Daniel Jasper via cfe-commits
djasper marked an inline comment as done. Comment at: lib/Format/Format.cpp:1677 @@ +1676,3 @@ +unsigned Category; +if (LookForMainHeader &&! Matches[1].startswith("<")) { + Category = 0; klimek wrote: > Run clang-format. > > Also, should

r248782 - clang-format: Extend #include sorting functionality

2015-09-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Sep 29 02:53:08 2015 New Revision: 248782 URL: http://llvm.org/viewvc/llvm-project?rev=248782&view=rev Log: clang-format: Extend #include sorting functionality Recognize the main module header as well as different #include categories. This should now mimic the behavior o

Re: [PATCH] D13228: clang-format: Extend #include sorting functionality

2015-09-29 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r248782. http://reviews.llvm.org/D13228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r248802 - clang-format: Add a new brace style "custom" as well as flags to

2015-09-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Sep 29 09:57:55 2015 New Revision: 248802 URL: http://llvm.org/viewvc/llvm-project?rev=248802&view=rev Log: clang-format: Add a new brace style "custom" as well as flags to control the individual braces. The existing choices for brace wrapping are now merely presets for t

Re: [PATCH] D13210: Make brace styles more configurable

2015-09-29 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r248802. http://reviews.llvm.org/D13210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12492: [Clang-Format] Add AlwaysBreakBeforeElse and AlwaysBreakBeforeCatch Style to avoid cuddled else/catch

2015-09-29 Thread Daniel Jasper via cfe-commits
djasper added a comment. I think r248802 should make this mostly obsolete, but feel free to add the tests :-). http://reviews.llvm.org/D12492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

Re: [PATCH] D12362: [clang-format] Add support of consecutive declarations alignment

2015-09-29 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:270 @@ +269,3 @@ + if (Changes[i].NewlinesBefore > 1 || !FoundDeclarationOnLine || + FoundLeftBraceOnLine || FoundLeftParenOnLine) { +AlignSequence(); Generally, we d

Re: [PATCH] D12362: [clang-format] Add support of consecutive declarations alignment

2015-09-29 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: unittests/Format/FormatTest.cpp:8699 @@ +8698,3 @@ + Alignment)); + Alignment.AlignConsecutiveAssignments = true; + verifyFormat("float something = 2000;\n" berenm wrote: > djasper wrote: > > Can

Re: [PATCH] D12492: [Clang-Format] Add AlwaysBreakBeforeElse and AlwaysBreakBeforeCatch Style to avoid cuddled else/catch

2015-09-29 Thread Daniel Jasper via cfe-commits
djasper added a comment. What do you mean by "this looks good"? http://reviews.llvm.org/D12492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r248904 - clang-format: Use Rewriter again to write the output files.

2015-09-30 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Sep 30 08:59:29 2015 New Revision: 248904 URL: http://llvm.org/viewvc/llvm-project?rev=248904&view=rev Log: clang-format: Use Rewriter again to write the output files. This has two advantages: 1. Atomic writes. 2. Proper handling of line endings (hopefully solving llvm.o

Re: r248904 - clang-format: Use Rewriter again to write the output files.

2015-09-30 Thread Daniel Jasper via cfe-commits
This breaks your *build*? How? On Wed, Sep 30, 2015 at 9:19 PM, Jan Vesely wrote: > Hi, > I think this change breaks cmake build. Please consider the attached fix > (I can't push atm). > > thank you, > Jan > > On Wed, Sep 30, 2015 at 8:59 AM, Daniel Jasper vi

r248929 - clang-format: Add clangRewrite dependency to fix cmake build.

2015-09-30 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Sep 30 14:28:47 2015 New Revision: 248929 URL: http://llvm.org/viewvc/llvm-project?rev=248929&view=rev Log: clang-format: Add clangRewrite dependency to fix cmake build. Modified: cfe/trunk/tools/clang-format/CMakeLists.txt Modified: cfe/trunk/tools/clang-format/CMa

Re: r248904 - clang-format: Use Rewriter again to write the output files.

2015-09-30 Thread Daniel Jasper via cfe-commits
breaks cmake build. Please consider the attached fix >> (I can't push atm). >> >> thank you, >> Jan >> >> On Wed, Sep 30, 2015 at 8:59 AM, Daniel Jasper via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> Author: djasper >&

Re: r248904 - clang-format: Use Rewriter again to write the output files.

2015-09-30 Thread Daniel Jasper via cfe-commits
e: > >> This breaks your *build*? How? >> >> On Wed, Sep 30, 2015 at 9:19 PM, Jan Vesely >> wrote: >> >>> Hi, >>> I think this change breaks cmake build. Please consider the attached fix >>> (I can't push atm). >>> >>

Re: [PATCH] D12362: [clang-format] Add support of consecutive declarations alignment

2015-10-01 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. This looks awesome. Do you have commit access? Comment at: unittests/Format/FormatTest.cpp:8699 @@ +8698,3 @@ + "int one = 1;\n" + "

Re: [PATCH] D12362: [clang-format] Add support of consecutive declarations alignment

2015-10-01 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r248999. Thank you! http://reviews.llvm.org/D12362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r248999 - [clang-format] Add support of consecutive declarations alignment

2015-10-01 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Oct 1 05:06:54 2015 New Revision: 248999 URL: http://llvm.org/viewvc/llvm-project?rev=248999&view=rev Log: [clang-format] Add support of consecutive declarations alignment This allows clang-format to align identifiers in consecutive declarations. This is useful for incr

Re: [PATCH] D10370: clang-format: Implement AlwaysBreakAfterDeclarationReturnType.

2015-10-02 Thread Daniel Jasper via cfe-commits
djasper added a comment. No. I really don't want to have these two completely independent flags, so the patch needs changes, before it can go in. http://reviews.llvm.org/D10370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

r249289 - clang-format: Document threshold for adding new options.

2015-10-05 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Oct 5 02:24:55 2015 New Revision: 249289 URL: http://llvm.org/viewvc/llvm-project?rev=249289&view=rev Log: clang-format: Document threshold for adding new options. Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst Modified: cfe/trunk/docs/ClangFormatStyleOptions

r249290 - clang-format: Remove sentence in option cost threshold that weakens the

2015-10-05 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Oct 5 02:36:40 2015 New Revision: 249290 URL: http://llvm.org/viewvc/llvm-project?rev=249290&view=rev Log: clang-format: Remove sentence in option cost threshold that weakens the statement. Specifically, we don't want people that have already written a patch to just writ

r249312 - clang-format: Small doc fix.

2015-10-05 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Oct 5 08:30:42 2015 New Revision: 249312 URL: http://llvm.org/viewvc/llvm-project?rev=249312&view=rev Log: clang-format: Small doc fix. Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst URL: http://llvm.org/v

r249392 - clang-format: Make IncludeCategories configurable in .clang-format file.

2015-10-06 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 6 06:54:18 2015 New Revision: 249392 URL: http://llvm.org/viewvc/llvm-project?rev=249392&view=rev Log: clang-format: Make IncludeCategories configurable in .clang-format file. This was made much easier by introducing an IncludeCategory struct to replace the previous

r249394 - clang-format: Add empty line before code-blocks in Docs.

2015-10-06 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 6 07:11:51 2015 New Revision: 249394 URL: http://llvm.org/viewvc/llvm-project?rev=249394&view=rev Log: clang-format: Add empty line before code-blocks in Docs. Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst cfe/trunk/docs/tools/dump_format_style.py Mo

r249501 - clang-format: Fix false positive in pointer/reference detection.

2015-10-06 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 6 20:41:14 2015 New Revision: 249501 URL: http://llvm.org/viewvc/llvm-project?rev=249501&view=rev Log: clang-format: Fix false positive in pointer/reference detection. Before: return options != nullptr &&operator==(*options); After: return options != nullptr &&

r249502 - clang-format: Understand array reference types.

2015-10-06 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 6 20:41:22 2015 New Revision: 249502 URL: http://llvm.org/viewvc/llvm-project?rev=249502&view=rev Log: clang-format: Understand array reference types. Before: void f(Type(¶meter)[10]) {} void f(Type (*parameter)[10]) {} After: void f(Type (¶meter)[10]) {} v

r249517 - clang-format: Fix false ObjC block detection.

2015-10-06 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 6 22:43:10 2015 New Revision: 249517 URL: http://llvm.org/viewvc/llvm-project?rev=249517&view=rev Log: clang-format: Fix false ObjC block detection. Before: inline A operator^(const A &lhs, const A &rhs) {} int i; After: inline A operator^(const A &lhs, const A

r249519 - Make clang-format actually respect custom brace wrapping flags.

2015-10-06 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 6 23:06:10 2015 New Revision: 249519 URL: http://llvm.org/viewvc/llvm-project?rev=249519&view=rev Log: Make clang-format actually respect custom brace wrapping flags. This fixes llvm.org/PR25073. Modified: cfe/trunk/lib/Format/Format.cpp cfe/trunk/unittests

r249542 - clang-format: Hopefully fix code blocks in docs.

2015-10-07 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Oct 7 08:02:45 2015 New Revision: 249542 URL: http://llvm.org/viewvc/llvm-project?rev=249542&view=rev Log: clang-format: Hopefully fix code blocks in docs. Otherwise I will have to install sphinx ;).. Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst cfe/tru

Re: r249392 - clang-format: Make IncludeCategories configurable in .clang-format file.

2015-10-07 Thread Daniel Jasper via cfe-commits
t; > .. code-block:: c++ > IncludeCategories: > - Regex: '^"(llvm|llvm-c|clang|clang-c)/' > Priority:2 > - Regex: '^(<|"(gtest|isl|json)/)' > Priority:3 > - Regex: '.\*'

Re: [PATCH] D13513: [clang-format] Stop alignment sequences on open braces and parens when aligning assignments.

2015-10-07 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, thank you. Comment at: unittests/Format/FormatTest.cpp:8657 @@ +8656,3 @@ + "};\n" + "int i = 0;\n" + "auto v = type{\

r249552 - [clang-format] Stop alignment sequences on open braces and parens when

2015-10-07 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Oct 7 10:03:26 2015 New Revision: 249552 URL: http://llvm.org/viewvc/llvm-project?rev=249552&view=rev Log: [clang-format] Stop alignment sequences on open braces and parens when aligning assignments. This was done correctly when aligning the declarations, but not when a

Re: [PATCH] D13513: [clang-format] Stop alignment sequences on open braces and parens when aligning assignments.

2015-10-07 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r249552. http://reviews.llvm.org/D13513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12489: [clang-format] Fixed missing space between Obj-C for/in and a typecast

2015-10-07 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r249553. Sorry for the delay. http://reviews.llvm.org/D12489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r249553 - clang-format: Fixed missing space between Obj-C for/in and a typecast.

2015-10-07 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Oct 7 10:09:08 2015 New Revision: 249553 URL: http://llvm.org/viewvc/llvm-project?rev=249553&view=rev Log: clang-format: Fixed missing space between Obj-C for/in and a typecast. Fixes this bug: https://llvm.org/bugs/show_bug.cgi?id=24504 TokenAnnotator::spaceRequiredBe

r249567 - clang-format: Add include sorting capabilities to sublime, emacs and

2015-10-07 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Oct 7 12:00:20 2015 New Revision: 249567 URL: http://llvm.org/viewvc/llvm-project?rev=249567&view=rev Log: clang-format: Add include sorting capabilities to sublime, emacs and clang-format-diff.py. Modified: cfe/trunk/tools/clang-format/clang-format-diff.py cfe/

[PATCH] D13523: ASTMatchers: Keep AllCallbacks in a set instead of a vector

2015-10-07 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. AllCallbacks is currently only used to call onStartOfTranslationUnit and onEndOfTranslationUnit on them. In this (and any other scenario I can come up with

Re: [PATCH] D13523: ASTMatchers: Keep AllCallbacks in a set instead of a vector

2015-10-07 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r249598. http://reviews.llvm.org/D13523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r249598 - ASTMatchers: Keep AllCallbacks in a set instead of a vector

2015-10-07 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Oct 7 14:56:12 2015 New Revision: 249598 URL: http://llvm.org/viewvc/llvm-project?rev=249598&view=rev Log: ASTMatchers: Keep AllCallbacks in a set instead of a vector AllCallbacks is currently only used to call onStartOfTranslationUnit and onEndOfTranslationUnit on them

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-10 Thread Daniel Jasper via cfe-commits
djasper added a subscriber: djasper. Comment at: lib/CodeGen/CGClass.cpp:1842 @@ +1841,3 @@ + CGM.getCXXABI().getVTableAddressPoint(vptr.Base, vptr.VTableClass); + if (!VTableGlobal) return; + Prazek wrote: > majnemer wrote: > > The return should be on it's

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-10 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/CodeGen/CGClass.cpp:2155 @@ +2154,3 @@ +if (CGM.getCXXABI().canInitializeVPtr(Vptr.VTableClass, Vptr.Base.getBase(), + Vptr.NearestVBase)) + InitializeVTablePointer(Vptr);

r244583 - Revert "[CUDA] Add implicit __attribute__((used)) to all __global__ functions."

2015-08-11 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Aug 11 06:02:09 2015 New Revision: 244583 URL: http://llvm.org/viewvc/llvm-project?rev=244583&view=rev Log: Revert "[CUDA] Add implicit __attribute__((used)) to all __global__ functions." This is breaking internal test. I'll provide a reproduction. Modified: cfe/tru

Re: [PATCH] clang-format: SpaceBeforeParens (Always) with overloaded operators

2015-08-11 Thread Daniel Jasper via cfe-commits
If possible, could you send to patch through reviews.llvm.org? On Tue, Aug 11, 2015 at 1:37 PM, Jon Chesterfield via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi, > > I believe this is being sent to the correct list. Please let me know if > there is a better choice. > > The clang-format

Re: [PATCH] D11957: SpaceBeforeParens (Always) with overloaded operators

2015-08-11 Thread Daniel Jasper via cfe-commits
djasper added a subscriber: djasper. djasper accepted this revision. djasper added a reviewer: djasper. djasper added a comment. This revision is now accepted and ready to land. Looks good. Do you have commit access? Repository: rL LLVM http://reviews.llvm.org/D11957 __

r244660 - clang-format: Make SpaceBeforeParens work with overloaded operators.

2015-08-11 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Aug 11 15:32:24 2015 New Revision: 244660 URL: http://llvm.org/viewvc/llvm-project?rev=244660&view=rev Log: clang-format: Make SpaceBeforeParens work with overloaded operators. Patch by Jon Chesterfield, thank you! Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp

Re: [PATCH] D11957: SpaceBeforeParens (Always) with overloaded operators

2015-08-11 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r244660. Thank you. Repository: rL LLVM http://reviews.llvm.org/D11957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang-tools-extra] r244745 - Lazily initialize HeaderFilter in ClangTidyDiagnosticConsumer. This

2015-08-12 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Aug 12 08:16:41 2015 New Revision: 244745 URL: http://llvm.org/viewvc/llvm-project?rev=244745&view=rev Log: Lazily initialize HeaderFilter in ClangTidyDiagnosticConsumer. This removes a corner case in tests that don't set the diagnostic consumer. In tests, it is good, not

r244890 - clang-format: Fix incorrect lambda-detection.

2015-08-13 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Aug 13 08:37:08 2015 New Revision: 244890 URL: http://llvm.org/viewvc/llvm-project?rev=244890&view=rev Log: clang-format: Fix incorrect lambda-detection. Before: [ a, a ]() -> a<1>{}; After: [a, a]() -> a<1> {}; Modified: cfe/trunk/lib/Format/UnwrappedLineParse

<    1   2   3   4   5   6   7   8   >