r244891 - clang-format: Inside decltype(), there is an expression.

2015-08-13 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Aug 13 08:43:51 2015 New Revision: 244891 URL: http://llvm.org/viewvc/llvm-project?rev=244891&view=rev Log: clang-format: Inside decltype(), there is an expression. Before: decltype(a* b) F(); After: decltype(a * b) F(); Modified: cfe/trunk/lib/Format/TokenAnno

r245043 - clang-format: Don't remove space between #elif and parentheses.

2015-08-14 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Aug 14 07:44:06 2015 New Revision: 245043 URL: http://llvm.org/viewvc/llvm-project?rev=245043&view=rev Log: clang-format: Don't remove space between #elif and parentheses. Before: #elif( && ) After: #elif ( && ) Modified: cfe/trunk/lib/Format/Fo

[clang-tools-extra] r245048 - misc-unused-parameters: Fix crasher with C forward declarations that

2015-08-14 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Aug 14 08:39:57 2015 New Revision: 245048 URL: http://llvm.org/viewvc/llvm-project?rev=245048&view=rev Log: misc-unused-parameters: Fix crasher with C forward declarations that can leave out the parameter list. Modified: clang-tools-extra/trunk/clang-tidy/misc/Unused

[clang-tools-extra] r245500 - Fix IncludeInserter to allow for more than one added header per file.

2015-08-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Aug 19 16:02:27 2015 New Revision: 245500 URL: http://llvm.org/viewvc/llvm-project?rev=245500&view=rev Log: Fix IncludeInserter to allow for more than one added header per file. Also adapt tests a bit to make it possible to test this. Removed checking the number of error

Re: [clang-tools-extra] r244586 - Add an IncludeInserter to clang-tidy.

2015-08-19 Thread Daniel Jasper via cfe-commits
On Tue, Aug 11, 2015 at 1:37 PM, Manuel Klimek via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: klimek > Date: Tue Aug 11 06:37:48 2015 > New Revision: 244586 > > URL: http://llvm.org/viewvc/llvm-project?rev=244586&view=rev > Log: > Add an IncludeInserter to clang-tidy. > > Will be u

[clang-tools-extra] r245510 - Remove empty destructors added in r245500. I got confused by my

2015-08-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Aug 19 17:04:55 2015 New Revision: 245510 URL: http://llvm.org/viewvc/llvm-project?rev=245510&view=rev Log: Remove empty destructors added in r245500. I got confused by my YouCompleteMe setup which apparently doesn't find the base classes and thus doesn't understand that

r245694 - clang-format: Be more conservative about specially indenting blocks in C++.

2015-08-21 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Aug 21 06:44:57 2015 New Revision: 245694 URL: http://llvm.org/viewvc/llvm-project?rev=245694&view=rev Log: clang-format: Be more conservative about specially indenting blocks in C++. This is a bit of a step back of what we did in r222531, as there are some corner cases

r245837 - clang-format: Properly handle braced lists in macros.

2015-08-24 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Aug 24 08:23:37 2015 New Revision: 245837 URL: http://llvm.org/viewvc/llvm-project?rev=245837&view=rev Log: clang-format: Properly handle braced lists in macros. Before: #define A\ { a, a } \ , After: #define A {a, a}, Modified: cfe/trunk/lib/Fo

r245843 - clang-format: Make formatting of member function reference qualifiers

2015-08-24 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Aug 24 09:28:08 2015 New Revision: 245843 URL: http://llvm.org/viewvc/llvm-project?rev=245843&view=rev Log: clang-format: Make formatting of member function reference qualifiers more consistent. Before: SomeType MemberFunction(const Deleted &)&&; SomeType MemberFunct

r245846 - clang-format: Always allow break after leading annotations.

2015-08-24 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Aug 24 10:10:01 2015 New Revision: 245846 URL: http://llvm.org/viewvc/llvm-project?rev=245846&view=rev Log: clang-format: Always allow break after leading annotations. Before: DEPRECATED("Use NewClass::NewFunction instead.") int OldFunction( const string ¶meter) {}

Re: r245843 - clang-format: Make formatting of member function reference qualifiers

2015-08-24 Thread Daniel Jasper via cfe-commits
On Mon, Aug 24, 2015 at 5:46 PM, David Blaikie wrote: > > > On Mon, Aug 24, 2015 at 7:28 AM, Daniel Jasper via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: djasper >> Date: Mon Aug 24 09:28:08 2015 >> New Revision: 245843 >> &g

r245934 - clang-format: Add space before member function reference qualifiers.

2015-08-25 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Aug 25 08:40:51 2015 New Revision: 245934 URL: http://llvm.org/viewvc/llvm-project?rev=245934&view=rev Log: clang-format: Add space before member function reference qualifiers. Before: SomeType MemberFunction(const Deleted &)&; After: SomeType MemberFunction(const D

Re: r245843 - clang-format: Make formatting of member function reference qualifiers

2015-08-25 Thread Daniel Jasper via cfe-commits
Changed in r245934. On Mon, Aug 24, 2015 at 5:48 PM, Daniel Jasper wrote: > > > On Mon, Aug 24, 2015 at 5:46 PM, David Blaikie wrote: > >> >> >> On Mon, Aug 24, 2015 at 7:28 AM, Daniel Jasper via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >

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

2015-08-26 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: unittests/Format/FormatTest.cpp:8619 @@ -8618,1 +8618,3 @@ +TEST_F(FormatTest, AlignConsecutiveDeclarations) { + FormatStyle Alignment = getLLVMStyle(); This needs tests that check what happens if both declarations and

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

2015-08-26 Thread Daniel Jasper via cfe-commits
djasper added a comment. Adding Matt, the original author of the code. (also I don't have much time to review this or the other patch today, but will try to finish before the end of the week) http://reviews.llvm.org/D12369 ___ cfe-commits mailing

r246146 - clang-format: Don't let a leading "template <..>" lead to wrapped initializers.

2015-08-27 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Aug 27 06:59:31 2015 New Revision: 246146 URL: http://llvm.org/viewvc/llvm-project?rev=246146&view=rev Log: clang-format: Don't let a leading "template <..>" lead to wrapped initializers. Before: Constructor() : initializer(0) {} template Constructor() : in

Re: [PATCH] D12405: [clang-format-vs] Format the whole document if nothing is selected

2015-08-27 Thread Daniel Jasper via cfe-commits
If nothing is selected, clang-format should format the current line.. At least that's the intended behavior. Doesn't it do that? On Aug 27, 2015 3:21 PM, "Beren Minor" wrote: > berenm created this revision. > berenm added a reviewer: djasper. > berenm added a subscriber: cfe-commits. > > By defau

Re: [PATCH] D12405: [clang-format-vs] Format the whole document if nothing is selected

2015-08-27 Thread Daniel Jasper via cfe-commits
ught this would be an easy first step. > > -- > Beren Minor > > On Thu, Aug 27, 2015 at 3:36 PM, Aaron Ballman > wrote: > >> On Thu, Aug 27, 2015 at 9:34 AM, Daniel Jasper via cfe-commits >> wrote: >> > If nothing is selected, clang-format should format th

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-27 Thread Daniel Jasper via cfe-commits
djasper added a comment. I know nothing of Visual Studio, so I have added better reviewers. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r246278 - [OPENMP 4.0] Codegen for array sections.

2015-08-28 Thread Daniel Jasper via cfe-commits
This fails on the bot, reverting: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/12747/ On Fri, Aug 28, 2015 at 8:09 AM, Alexey Bataev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: abataev > Date: Fri Aug 28 01:09:05 2015 > New Revision: 246278 > > URL

Re: r246278 - [OPENMP 4.0] Codegen for array sections.

2015-08-28 Thread Daniel Jasper via cfe-commits
Sorry, totally forgot that your are in the right timezone. Will not revert for now and hope that you can figure this out :-) On Fri, Aug 28, 2015 at 9:10 AM, Daniel Jasper wrote: > This fails on the bot, reverting: > > http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/12

r246288 - Revert "[OPENMP 4.0] Codegen for array sections."

2015-08-28 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Aug 28 03:42:22 2015 New Revision: 246288 URL: http://llvm.org/viewvc/llvm-project?rev=246288&view=rev Log: Revert "[OPENMP 4.0] Codegen for array sections." The test is currently failing on bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check

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

2015-09-07 Thread Daniel Jasper via cfe-commits
djasper updated the summary for this revision. djasper updated this revision to Diff 34137. djasper added a comment. Now properly implemented merging of two replacement sets that are meant to be applied in sequence. I think this functionality will also be highly useful, e.g. when formatting the

Re: [PATCH] D13549: Added new options to ClangFormat VSIX package.

2015-10-08 Thread Daniel Jasper via cfe-commits
djasper added a comment. Please always add cfe-commits as "subscriber" so that the email also goes to the list. Repository: rL LLVM http://reviews.llvm.org/D13549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

r250009 - clang-format: [JS] handle character classes in regexes.

2015-10-11 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Sun Oct 11 22:13:48 2015 New Revision: 250009 URL: http://llvm.org/viewvc/llvm-project?rev=250009&view=rev Log: clang-format: [JS] handle character classes in regexes. Slashes in regular expressions do not need to be escaped and do not terminate the regular expression even w

Re: [PATCH] D13641: clang-format: [JS] handle character classes in regexes.

2015-10-11 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 Comment at: lib/Format/Format.cpp:879 @@ -878,2 +878,3 @@ unsigned TokenCount = 0; +auto InCharacterClass = false; for (auto I = Tokens.rbegin() + 1

Re: [PATCH] D13641: clang-format: [JS] handle character classes in regexes.

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

r250010 - clang-format: Fixed typecast getting put on a separate line from the

2015-10-11 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Sun Oct 11 22:19:07 2015 New Revision: 250010 URL: http://llvm.org/viewvc/llvm-project?rev=250010&view=rev Log: clang-format: Fixed typecast getting put on a separate line from the key in Obj-C dictionary literals This fixes: https://llvm.org/PR22647 Patch by Kent Sutherlan

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

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

Re: [PATCH] D13516: Fix overlapping replacements in clang-tidy.

2015-10-14 Thread Daniel Jasper via cfe-commits
djasper added a subscriber: djasper. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:495-496 @@ +494,4 @@ + for (unsigned I = 0; I < NumErrors; ++I) { +const auto &Error = Errors[I]; +// Skip errors without fixes. They are never going to overlap with anything +

Re: [PATCH] D13516: Fix overlapping replacements in clang-tidy.

2015-10-14 Thread Daniel Jasper via cfe-commits
djasper added a comment. There might be an even easier algorithm: What if we put all start and end points into a single sorted list. Identical start points are sorted by decreasing end points and identical end points are sorted by increasing start points. Now do a single sweep and simply count

Re: [PATCH] D13516: Fix overlapping replacements in clang-tidy.

2015-10-15 Thread Daniel Jasper via cfe-commits
On Thu, Oct 15, 2015 at 6:29 AM, Angel Garcia wrote: > angelgarcia added a comment. > > I cannot find a way to make Daniel's idea work with equal intervals: > > In this case, fix A can be applied because B is completely contained inside > it. > A: [a, b)[c, d) > B: [a, b) > > This time, we should

r250440 - clang-format: Basic escaping when outputting XML.

2015-10-15 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Oct 15 13:39:31 2015 New Revision: 250440 URL: http://llvm.org/viewvc/llvm-project?rev=250440&view=rev Log: clang-format: Basic escaping when outputting XML. Modified: cfe/trunk/tools/clang-format/ClangFormat.cpp Modified: cfe/trunk/tools/clang-format/ClangFormat.cp

Re: [PATCH] D13549: Added new options to ClangFormat VSIX package.

2015-10-15 Thread Daniel Jasper via cfe-commits
djasper added a comment. While we are waiting, submitted the changes to ClangFormat.cpp in r250440. Thank you! http://reviews.llvm.org/D13549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

Re: [PATCH] D13765: clang-format: [JS] Handle string literals spanning character classes.

2015-10-16 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:755 @@ -754,3 +754,1 @@ - if (tryMergeEscapeSequence()) -return; if (tryMergeTemplateString()) I wonder if escape sequences are also relevant to template strings. If yes, we are

Re: [PATCH] D13765: clang-format: [JS] Handle string literals spanning character classes.

2015-10-17 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:828 @@ +827,3 @@ + // Returns \c true if \p Tok can only be followed by an operand in JavaScript. + bool PrecedesOperand(FormatToken *Tok) { +// NB: This is not entirely correct, as an r_paren can introduce an

r250629 - clang-format: Add test for (properly escaped) XML output.

2015-10-17 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Sat Oct 17 17:44:19 2015 New Revision: 250629 URL: http://llvm.org/viewvc/llvm-project?rev=250629&view=rev Log: clang-format: Add test for (properly escaped) XML output. Added: cfe/trunk/test/Format/xmloutput.cpp Added: cfe/trunk/test/Format/xmloutput.cpp URL: http://l

Re: r250440 - clang-format: Basic escaping when outputting XML.

2015-10-17 Thread Daniel Jasper via cfe-commits
Added in r250629. On Thu, Oct 15, 2015 at 11:43 AM, Nico Weber wrote: > test? > > On Thu, Oct 15, 2015 at 11:39 AM, Daniel Jasper via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: djasper >> Date: Thu Oct 15 13:39:31 2015 >> New Revi

Re: [PATCH] D13765: clang-format: [JS] Handle string literals spanning character classes.

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

r250648 - clang-format: [JS] Handle string literals spanning character classes.

2015-10-18 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Sun Oct 18 02:02:28 2015 New Revision: 250648 URL: http://llvm.org/viewvc/llvm-project?rev=250648&view=rev Log: clang-format: [JS] Handle string literals spanning character classes. If a RegExp contains a character group with a quote (/["]/), the trailing end of it is first

Re: [PATCH] D13765: clang-format: [JS] Handle string literals spanning character classes.

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

Re: [PATCH] D13811: [clang-format] AllowShortFunctionsOnASingleLine: true/Empty didn't work with BreakBeforeBraces: Linux/Allman.

2015-10-18 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/UnwrappedLineFormatter.cpp:193 @@ -192,3 +192,3 @@ (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && - I[1]->First->is(tok::r_brace)) || + I[1]->First->isOneOf(tok::l_brace, tok::r_br

Re: r248782 - clang-format: Extend #include sorting functionality

2015-10-19 Thread Daniel Jasper via cfe-commits
this week. On Sun, Oct 18, 2015 at 6:40 PM, Nico Weber wrote: > On Tue, Sep 29, 2015 at 12:53 AM, Daniel Jasper via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: djasper >> Date: Tue Sep 29 02:53:08 2015 >> New Revision: 248782 >> >> U

Re: r250831 - [AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap.

2015-10-21 Thread Daniel Jasper via cfe-commits
I think we'll need to come up with a different solution. The problem is that DynTypedNode is 5 times larger than the bare pointer and we are storing many more elements in the ParentMap. This means, this change is effectively increasing the parent map by 10x and it was already large to begin with.

Re: r250831 - [AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap.

2015-10-21 Thread Daniel Jasper via cfe-commits
Thanks. On Wed, Oct 21, 2015 at 12:14 PM, Benjamin Kramer wrote: > Reverted for now in r250889. > > On Wed, Oct 21, 2015 at 12:07 PM, Daniel Jasper > wrote: > > I think we'll need to come up with a different solution. The problem is > that > > DynTypedNode is 5 times larger than the bare pointe

Re: [PATCH] D13853: clang-format: Teach --sort-includes that #include and #import mean the same thing.

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

[clang-tools-extra] r251262 - [clang-tidy] Add return value for non-assert builds.

2015-10-25 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Sun Oct 25 16:44:55 2015 New Revision: 251262 URL: http://llvm.org/viewvc/llvm-project?rev=251262&view=rev Log: [clang-tidy] Add return value for non-assert builds. Modified: clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.cpp Modified: clang-tools

Re: [PATCH] D14052: clang-format: Format std::function template parameter consistently inside function

2015-10-25 Thread Daniel Jasper via cfe-commits
djasper added a comment. I'll take a look. I agree that there should be a better approach. Also, you seem to have created the inverse patch :-). http://reviews.llvm.org/D14052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

r251284 - clang-format: Fix false positive in cast detection.

2015-10-26 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Oct 26 07:08:47 2015 New Revision: 251284 URL: http://llvm.org/viewvc/llvm-project?rev=251284&view=rev Log: clang-format: Fix false positive in cast detection. Before (with spaces in parentheses): void inFunction() { std::function fct; } After: void inFunction() { s

Re: [PATCH] D14052: clang-format: Format std::function template parameter consistently inside function

2015-10-26 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Submitted tests and alternative fix in r251284. Seems to me, there can never be a cast right before a ">". http://reviews.llvm.org/D14052 ___

[PATCH] D14104: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

2015-10-26 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. If this option is set, clang-format will always insert a line wrap, e.g. before the first parameter of a function call unless all parameters fit on the same

[PATCH] D14105: clang-format: When a line is formatted, also format subsequence lines if their indent is off.

2015-10-26 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 is especially important so that if a change is solely inserting a block around a few statements, clang-format-diff.py will still clean up and add inde

Re: r251284 - clang-format: Fix false positive in cast detection.

2015-10-26 Thread Daniel Jasper via cfe-commits
I mixed up before and after. Other than that, I don't see a typo. On Mon, Oct 26, 2015 at 5:44 PM, David Blaikie wrote: > > > On Mon, Oct 26, 2015 at 5:08 AM, Daniel Jasper via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: djasper >>

Re: r251284 - clang-format: Fix false positive in cast detection.

2015-10-26 Thread Daniel Jasper via cfe-commits
the commit message says "void( > int, int )" -> "void( int, int)", neither of which is what the test case > tests, right? > > >> >> On Mon, Oct 26, 2015 at 5:44 PM, David Blaikie >> wrote: >> >>> >>> >>> On Mon, Oc

Re: [PATCH] D14104: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

2015-10-27 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 38518. djasper marked 5 inline comments as done. djasper added a comment. Addressed review comments. http://reviews.llvm.org/D14104 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/

Re: [PATCH] D14104: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

2015-10-27 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:882 @@ -876,1 +881,3 @@ State.Stack.back().NestedBlockIndent); + bool NoLineBreak = State.Stack.back().NoLineBreak || + (Current.is(TT_Templ

Re: [PATCH] D14104: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

2015-10-27 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:334 @@ +333,3 @@ + if (Style.AlignAfterOpenBracket == FormatStyle::BAS_AlwaysBreak && + Previous.is(tok::l_paren) && State.Column > getNewLineColumn(State) && + (!Previous.Previous || ---

Re: [PATCH] D14104: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

2015-10-27 Thread Daniel Jasper via cfe-commits
djasper marked an inline comment as done. djasper added a comment. http://reviews.llvm.org/D14104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14104: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

2015-10-27 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 38524. djasper added a comment. Extended comment. http://reviews.llvm.org/D14104 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp lib/Format/FormatToken.cpp lib/Forma

Re: [PATCH] D14104: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

2015-10-27 Thread Daniel Jasper via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251405: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak. (authored by djasper). Changed prior to commit: http://reviews.llvm.org/D14104?vs=38524&id=38529#toc Repository: r

r251405 - clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

2015-10-27 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 27 07:38:37 2015 New Revision: 251405 URL: http://llvm.org/viewvc/llvm-project?rev=251405&view=rev Log: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak. Summary: If this option is set, clang-format will always insert a line wrap, e.g. befo

r251406 - clang-format: Undo unwanted format change done in r251405.

2015-10-27 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 27 08:42:08 2015 New Revision: 251406 URL: http://llvm.org/viewvc/llvm-project?rev=251406&view=rev Log: clang-format: Undo unwanted format change done in r251405. Specifically, don't wrap between the {} of an empty constructor if the "}" falls on column 81 and Constr

r251463 - clang-format: Increase cut-off limit for number of analyzed states.

2015-10-27 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 27 17:55:55 2015 New Revision: 251463 URL: http://llvm.org/viewvc/llvm-project?rev=251463&view=rev Log: clang-format: Increase cut-off limit for number of analyzed states. With more complex structures in C++ Lambdas and JavaScript function literals, the old value was

r251474 - clang-format: When a line is formatted, also format subsequence lines if their indent is off.

2015-10-27 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 27 20:08:22 2015 New Revision: 251474 URL: http://llvm.org/viewvc/llvm-project?rev=251474&view=rev Log: clang-format: When a line is formatted, also format subsequence lines if their indent is off. Summary: This is especially important so that if a change is solely

Re: [PATCH] D14105: clang-format: When a line is formatted, also format subsequence lines if their indent is off.

2015-10-27 Thread Daniel Jasper via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251474: clang-format: When a line is formatted, also format subsequence lines if… (authored by djasper). Changed prior to commit: http://reviews.llvm.org/D14105?vs=38497&id=38616#toc Repository: rL L

[clang-tools-extra] r251520 - Change test to just define NULL instead of #including stddef.h. In some

2015-10-28 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Oct 28 09:51:09 2015 New Revision: 251520 URL: http://llvm.org/viewvc/llvm-project?rev=251520&view=rev Log: Change test to just define NULL instead of #including stddef.h. In some test environments, even that builtin header isn't available. Also, this makes it more consis

r251643 - clang-format: [JS] Add goog.setTestOnly to the list of stuff that

2015-10-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Oct 29 14:05:20 2015 New Revision: 251643 URL: http://llvm.org/viewvc/llvm-project?rev=251643&view=rev Log: clang-format: [JS] Add goog.setTestOnly to the list of stuff that is import-statement-like and shouldn't be wrapped. Modified: cfe/trunk/lib/Format/TokenAnnota

Re: [PATCH] D14188: Format: support inline namespaces

2015-10-29 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Expression can be simplified, otherwise looks good. Comment at: lib/Format/UnwrappedLineParser.cpp:1370 @@ -1369,2 +1369,3 @@ nextToken(); - if (FormatTok->Tok.is(tok::i

[PATCH] D14213: clang-format: Be slightly more cautious when formatting subsequent lines after a change. With r251474, clang-format could indent the entire rest of the file, if there is a missing clos

2015-10-31 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. With this change, clang-format stops formatting when either it leaves the current scope or when it comes back to the initial scope after going into a nested

r251760 - clang-format: Be slightly more cautious when formatting subsequent lines after a change. With r251474, clang-format could indent the entire rest of the file, if there is a missing closing br

2015-10-31 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Sat Oct 31 19:27:35 2015 New Revision: 251760 URL: http://llvm.org/viewvc/llvm-project?rev=251760&view=rev Log: clang-format: Be slightly more cautious when formatting subsequent lines after a change. With r251474, clang-format could indent the entire rest of the file, if t

Re: [PATCH] D14213: clang-format: Be slightly more cautious when formatting subsequent lines after a change. With r251474, clang-format could indent the entire rest of the file, if there is a missing

2015-10-31 Thread Daniel Jasper via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251760: clang-format: Be slightly more cautious when formatting subsequent lines… (authored by djasper). Changed prior to commit: http://reviews.llvm.org/D14213?vs=38838&id=38839#toc Repository: rL L

r251824 - clang-format: Simplify and improve stop condition for formatting

2015-11-02 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Nov 2 14:02:49 2015 New Revision: 251824 URL: http://llvm.org/viewvc/llvm-project?rev=251824&view=rev Log: clang-format: Simplify and improve stop condition for formatting unaffected lines with incorrect initial indent. Starting from: namespace { int i; // There s

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

2015-11-04 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:163-171 @@ -162,9 +162,11 @@ unsigned MinColumn = 0; unsigned MaxColumn = UINT_MAX; unsigned StartOfSequence = 0; unsigned EndOfSequence = 0; bool FoundAssignmentOnLine = false; - bool Fo

r252089 - clang-format: Turn on wrapping before "else" for WebKit style.

2015-11-04 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Nov 4 16:49:32 2015 New Revision: 252089 URL: http://llvm.org/viewvc/llvm-project?rev=252089&view=rev Log: clang-format: Turn on wrapping before "else" for WebKit style. Modified: cfe/trunk/lib/Format/Format.cpp Modified: cfe/trunk/lib/Format/Format.cpp URL: http:

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

2015-11-04 Thread Daniel Jasper via cfe-commits
djasper added a comment. I like it :-) Comment at: lib/Format/WhitespaceManager.cpp:151 @@ -150,13 +150,3 @@ -// Walk through all of the changes and find sequences of "=" to align. To do -// so, keep track of the lines and whether or not an "=" was found on align. If -// a "=

Re: [PATCH] D14191: Make ArgumentAdjuster aware of the current file being processed.

2015-11-04 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. http://reviews.llvm.org/D14191 ___ cfe-commits mailing list

Re: [PATCH] D14192: Add ExtraArgs and ExtraArgsBefore options to enable clang warnings via configuration files.

2015-11-04 Thread Daniel Jasper via cfe-commits
djasper added a subscriber: djasper. Comment at: clang-tidy/ClangTidy.cpp:46 @@ +45,3 @@ + +#include "llvm/ADT/StringExtras.h" + This doesn't seem to be the right place for this #include. Comment at: clang-tidy/ClangTidyOptions.h:89-93 @@ -86,1 +

Re: [PATCH] D14192: Add ExtraArgs and ExtraArgsBefore options to enable clang warnings via configuration files.

2015-11-05 Thread Daniel Jasper via cfe-commits
djasper added a comment. I'll let Manuel review this tomorrow. He expressed some concerns. http://reviews.llvm.org/D14192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2015-11-08 Thread Daniel Jasper via cfe-commits
Please read http://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options Does your style option qualify? On Sun, Nov 8, 2015 at 8:04 AM, JVApen wrote: > JVApen created this revision. > JVApen added a reviewer: djasper. > JVApen added a subscriber: cfe-commits. > JVApe

Re: [PATCH] clang-format: Add "AllowShortNamespacesOnASingleLine" option

2015-08-07 Thread Daniel Jasper via cfe-commits
Would it be possible to send the patch through reviews.llvm.org? It makes review much easier for me. On Thu, Aug 6, 2015 at 6:18 PM, chris beck via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Rationale: > > I sometimes use a different clang tool, iwyu ("include what you use"), to > clean u

Re: [PATCH] D11851: clang-format: Add "AllowShortNamespacesOnASingleLine" option

2015-08-10 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:115 @@ -114,1 +114,3 @@ + /// \brief If \c true, namespace a { class b; } can be put + /// on a single line Don't use markup here. Use a \code block instead. Comment a

Re: [PATCH] D11837: Add Qt brace style configuration option.

2015-08-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. Do you have commit access? Comment at: include/clang/Format/Format.h:180 @@ +179,3 @@ +BS_GNU, +/// Like ``Attach``, but break before braces on functions

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

2015-08-10 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 31670. djasper added a comment. Added an alternative way to handle the two sets of Replacements: Merge them properly. I haven't completely finished implementing / testing this. Wanted to get feedback first before going further down this road. http://revie

[clang-tools-extra] r244454 - misc-unused-parameters: Don't touch K&R style functions.

2015-08-10 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Aug 10 10:45:46 2015 New Revision: 244454 URL: http://llvm.org/viewvc/llvm-project?rev=244454&view=rev Log: misc-unused-parameters: Don't touch K&R style functions. We couldn't calculate the removal ranges properly at this point. Added: clang-tools-extra/trunk/test/

Re: [PATCH] D22505: clang-format Access Modifier Use Normal Indent

2016-07-19 Thread Daniel Jasper via cfe-commits
djasper added a comment. Before we continue with the actual code review and brainstorming how we could actually call this option, can you read through http://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options and provide feedback about why this option qualifies?

Re: [PATCH] D22505: clang-format Access Modifier Use Normal Indent

2016-07-25 Thread Daniel Jasper via cfe-commits
djasper added a comment. Sorry, my bad. I should have replied sooner. I believe we can move further with this seems to be used widely enough (though it really doesn't make sense in my personal opinion ;) ). My main concern is how we are going to configure this in the long run. This is mostly m

r276854 - clang-format: Fix incorrect detection of QT-signals access specifier.

2016-07-27 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Jul 27 05:13:24 2016 New Revision: 276854 URL: http://llvm.org/viewvc/llvm-project?rev=276854&view=rev Log: clang-format: Fix incorrect detection of QT-signals access specifier. Before: void f() { label: signals .baz(); } After: void f() { label: s

r277141 - Add missing '-no-canonical-prefixes' in test.

2016-07-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Jul 29 08:45:03 2016 New Revision: 277141 URL: http://llvm.org/viewvc/llvm-project?rev=277141&view=rev Log: Add missing '-no-canonical-prefixes' in test. Modified: cfe/trunk/test/Driver/offloading-interoperability.c Modified: cfe/trunk/test/Driver/offloading-interop

Re: [PATCH] D22431: clang-format: [JS] nested and tagged template strings.

2016-08-02 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/FormatTokenLexer.cpp:254 @@ +253,3 @@ + for (; Offset != Lex->getBuffer().end(); ++Offset) { +if (*Offset == '`') { + StateStack.pop(); I'd use Offset[0] Comment at: lib/Format/Forma

Re: [PATCH] D22505: clang-format Access Modifier Use Normal Indent

2016-08-02 Thread Daniel Jasper via cfe-commits
djasper added a comment. So you'd be for #1 of the three choices from my previous comment? https://reviews.llvm.org/D22505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22505: clang-format Access Modifier Use Normal Indent

2016-08-02 Thread Daniel Jasper via cfe-commits
djasper added a comment. I generally agree. Note, however, that the mentioned style guide doesn't actually specify this. All it says is "The public, protected, and private keywords should be indented inside the class with the function declarations indented as well." So I guess, class C {

Re: [PATCH] D22505: clang-format Access Modifier Use Normal Indent

2016-08-02 Thread Daniel Jasper via cfe-commits
djasper added a comment. No, I don't think so. Because you need a "double-indent" within classes. https://reviews.llvm.org/D22505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23264: Fixes calculateRangesAfterReplacements crash when Replacements is empty.

2016-08-08 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/D23264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

Re: [PATCH] D10807: clang-format: Add SpaceAfterTemplate

2016-08-09 Thread Daniel Jasper via cfe-commits
djasper added a comment. I still believe it's wrong to care about this in particular, but I also don't want to hold clang-format hostage for my own beliefs. Obviously, enough people care and the costs are limited. Comment at: include/clang/Format/Format.h:356 @@ +355,3 @@ + /

Re: [PATCH] D23317: clang-format: Add SpaceAfterTemplate

2016-08-09 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/D23317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

Re: [PATCH] D23317: clang-format: Add SpaceAfterTemplate

2016-08-09 Thread Daniel Jasper via cfe-commits
djasper added a comment. I don't think this is worth a release note. https://reviews.llvm.org/D23317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23274: Add an option to clang-format to remove duplicate headers.

2016-08-10 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1242 @@ -1240,1 +1241,3 @@ }); + // The index of the include on which the cursor is currently put. + unsigned CurrentCursorIndex = UINT_MAX; This needs a comment on what it is actually doing

Re: [PATCH] D23274: Add an style option "DeduplicateIncludes" to clang-format to remove duplicate headers when sorting #includes.

2016-08-10 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:551 @@ +550,3 @@ + /// sorting ``#includes``. + bool DeduplicateIncludes; + Actually, how about we just do this unconditionally? I think people will always want it. https://reviews.llvm.

Re: [PATCH] D23274: Make clang-format remove duplicate headers when sorting #includes.

2016-08-10 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1224 @@ -1222,1 +1223,3 @@ +// Finds the index of the #include on which the cursor will be put after +// sorting/deduplicating. First off, make this return a pair with the two values. And then the

Re: [PATCH] D23274: Make clang-format remove duplicate headers when sorting #includes.

2016-08-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/D23274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

<    1   2   3   4   5   6   7   8   >