r339803 - clang-format: Change Google style wrt. the formatting of empty messages.

2018-08-15 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Aug 15 12:07:55 2018 New Revision: 339803 URL: http://llvm.org/viewvc/llvm-project?rev=339803&view=rev Log: clang-format: Change Google style wrt. the formatting of empty messages. Before: message Empty { } After: message Empty {} Modified: cfe/trunk/lib/Form

r315439 - Revert r314955: "Remove PendingBody mechanism for function and ObjC method deserialization."

2017-10-11 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Oct 11 00:47:54 2017 New Revision: 315439 URL: http://llvm.org/viewvc/llvm-project?rev=315439&view=rev Log: Revert r314955: "Remove PendingBody mechanism for function and ObjC method deserialization." This is breaking a build of https://github.com/abseil/abseil-cpp and

r326023 - Make module use diagnostics refer to the top-level module

2018-02-23 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Feb 23 22:54:09 2018 New Revision: 326023 URL: http://llvm.org/viewvc/llvm-project?rev=326023&view=rev Log: Make module use diagnostics refer to the top-level module All use declarations need to be directly placed in the top-level module anyway, knowing the submodule doe

r326024 - Remove unused variable. We should be warning-free.

2018-02-23 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Feb 23 22:57:47 2018 New Revision: 326024 URL: http://llvm.org/viewvc/llvm-project?rev=326024&view=rev Log: Remove unused variable. We should be warning-free. Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp Modified: cfe/trunk/lib/StaticAnalyzer/

r305182 - Revert r305164/5/7.

2017-06-12 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jun 12 03:08:18 2017 New Revision: 305182 URL: http://llvm.org/viewvc/llvm-project?rev=305182&view=rev Log: Revert r305164/5/7. cc1as does not currently access the "--" version of this flag. At the very least this needs to be fixed and proper test cases need to be added.

r305456 - Revert "Define _GNU_SOURCE for rtems c++"

2017-06-15 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Jun 15 04:17:12 2017 New Revision: 305456 URL: http://llvm.org/viewvc/llvm-project?rev=305456&view=rev Log: Revert "Define _GNU_SOURCE for rtems c++" This reverts commit r305399. This breaks a build in libcxx: libcxx/src/system_error.cpp:90:16: error: assigning to 'int'

r305574 - Ignore return value in test.

2017-06-16 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Jun 16 14:29:20 2017 New Revision: 305574 URL: http://llvm.org/viewvc/llvm-project?rev=305574&view=rev Log: Ignore return value in test. Modified: cfe/trunk/test/Driver/m_and_mm.c Modified: cfe/trunk/test/Driver/m_and_mm.c URL: http://llvm.org/viewvc/llvm-project/c

r305665 - clang-format: Add capability to format the diff on save in vim.

2017-06-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jun 19 02:30:04 2017 New Revision: 305665 URL: http://llvm.org/viewvc/llvm-project?rev=305665&view=rev Log: clang-format: Add capability to format the diff on save in vim. With this patch, one can configure a BufWrite hook that will make the clang-format integration comp

r305666 - clang-format: Handle "if constexpr".

2017-06-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jun 19 02:40:49 2017 New Revision: 305666 URL: http://llvm.org/viewvc/llvm-project?rev=305666&view=rev Log: clang-format: Handle "if constexpr". c++1z adds the following constructions to the language: if constexpr (cond) statement1; else if constexpr (cond)

r305667 - clang-format: Improve understanding of combined typedef+record declarations

2017-06-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jun 19 02:45:41 2017 New Revision: 305667 URL: http://llvm.org/viewvc/llvm-project?rev=305667&view=rev Log: clang-format: Improve understanding of combined typedef+record declarations Fixes an issue where struct A { int X; }; would be broken onto multiple lines, but type

r327253 - Don't re-format raw string literal contents when formatting is disable

2018-03-12 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Mar 12 03:11:30 2018 New Revision: 327253 URL: http://llvm.org/viewvc/llvm-project?rev=327253&view=rev Log: Don't re-format raw string literal contents when formatting is disable Not entirely sure this is the best place to put this check, but it fixes the immediate issue

r327255 - clang-format: Properly handle implicit string concatenation in text protos

2018-03-12 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Mar 12 03:32:18 2018 New Revision: 327255 URL: http://llvm.org/viewvc/llvm-project?rev=327255&view=rev Log: clang-format: Properly handle implicit string concatenation in text protos Three issues to fix: - char_constants weren't properly treated as string literals - Prev

r311792 - [Format] Invert nestingAndIndentLevel pair in WhitespaceManager used for

2017-08-25 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Aug 25 12:14:53 2017 New Revision: 311792 URL: http://llvm.org/viewvc/llvm-project?rev=311792&view=rev Log: [Format] Invert nestingAndIndentLevel pair in WhitespaceManager used for alignments Indent should be compared before nesting level to determine if a token is on th

r312437 - clang-format: Fix formatting of for loops with multiple increments.

2017-09-03 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Sun Sep 3 01:56:24 2017 New Revision: 312437 URL: http://llvm.org/viewvc/llvm-project?rev=312437&view=rev Log: clang-format: Fix formatting of for loops with multiple increments. This fixes llvm.org/PR34366. Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp cfe/tru

r312484 - clang-format: Fix indentation of macros in include guards (after r312125).

2017-09-04 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Sep 4 06:33:52 2017 New Revision: 312484 URL: http://llvm.org/viewvc/llvm-project?rev=312484&view=rev Log: clang-format: Fix indentation of macros in include guards (after r312125). Before: #ifndef A_H #define A_H #define A() \ int i;\ int j; #endif //

r312721 - [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLine

2017-09-07 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Sep 7 06:45:41 2017 New Revision: 312721 URL: http://llvm.org/viewvc/llvm-project?rev=312721&view=rev Log: [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLine The current description of AllowAllParametersOfDeclarationOnNextLine in the Clang-Fo

Re: r312766 - Update for llvm change.

2017-09-07 Thread Daniel Jasper via cfe-commits
Hi Rafael, could you write slightly more extensive commit messages? This really doesn't say anything.. Thank you, Daniel On Fri, Sep 8, 2017 at 2:01 AM, Rafael Espindola via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rafael > Date: Thu Sep 7 17:01:26 2017 > New Revision: 312766

r312897 - Revert r312830: "Reinstall the patch "Use EmitPointerWithAlignment to get alignment information of the pointer used in atomic expr"."

2017-09-11 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Sep 11 00:35:01 2017 New Revision: 312897 URL: http://llvm.org/viewvc/llvm-project?rev=312897&view=rev Log: Revert r312830: "Reinstall the patch "Use EmitPointerWithAlignment to get alignment information of the pointer used in atomic expr"." This triggers llvm.org/PR316

Re: [PATCH] D24663: When replacements have the same offset, make replacements with smaller length order first in the set.

2016-09-17 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/Tooling/Core/Replacement.cpp:407 @@ -409,3 +406,3 @@ bool Result = true; - for (Replacements::const_iterator I = Replaces.begin(), -

Re: [PATCH] D24703: [clang-format] BreakBeforeBinaryOperations and AlignAfterOpenBracket conflict, bug 30304

2016-09-17 Thread Daniel Jasper via cfe-commits
djasper added a comment. I think, this is the wrong fix. Instead, a || (Left.is(TT_TemplateOpener) && !Right.is(TT_TemplateCloser)) should be added to the last return statement of this function. Also, could you please add a test in unittests/Format/FormatTest.cpp. https://reviews.llvm.org/D

Re: [PATCH] D24703: [clang-format] BreakBeforeBinaryOperations and AlignAfterOpenBracket conflict, bug 30304

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

Re: [PATCH] D24708: clang-format: [JS] Fix line breaks before comments when sorting imports.

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

Re: [PATCH] D24606: Recommit r281457 "Supports adding insertion around non-insertion replacements".

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

Re: [PATCH] D24717: Merge deletions that are contained in a larger deletion.

2016-09-19 Thread Daniel Jasper via cfe-commits
djasper added a comment. Thinking about this some more, starting to merge deletions now, but only some of them is a bit suspect. I think we either want to allow even more or continue to be restrictive for now. I think fundamentally, there are two questions that we need to answer: 1. Is this so

Re: [PATCH] D24717: Merge deletions that are contained in a larger deletion.

2016-09-19 Thread Daniel Jasper via cfe-commits
djasper added a comment. I actually think this is a good example. So lets assume we'd write a tool to fully quote binary expressions, e.g. that turns if (a * b + c * d == 10) ... into if (((a * b) + (c * d)) == 10) ... So, here, we would be inserting two "(" and two ")" at the same locati

Re: [PATCH] D24767: clang-format: [JS] do not wrapp @returns tags.

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

Re: [PATCH] D24804: clang-format: [JS] reserved words in method names.

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

Re: [PATCH] D24829: [clang-format] support header deletion in cleanupAroundReplacemnts.

2016-09-23 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:1557 @@ +1556,3 @@ + const std::set HeadersToDelete) { + if (HeadersToDelete.find(HeaderName) != HeadersTo

Re: [PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes

2016-09-23 Thread Daniel Jasper via cfe-commits
djasper added a comment. Are we talking completely past each other? I specifically think we should *NOT* combine NestingLevel and IndentLevel into one value. Not in ScopeLevel() and not anywhere else. https://reviews.llvm.org/D21279 ___ cfe-commit

r282410 - clang-format: Only special-case top-level */& in multivar-declstmts.

2016-09-26 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Sep 26 10:14:24 2016 New Revision: 282410 URL: http://llvm.org/viewvc/llvm-project?rev=282410&view=rev Log: clang-format: Only special-case top-level */& in multivar-declstmts. Before (even with PointerAlignment: Left): vector a, b; After: vector a, b; Modified:

Re: [PATCH] D15643: [clang-format] Don't allow newline after uppercase Obj-C block return types

2016-09-26 Thread Daniel Jasper via cfe-commits
djasper added a comment. Ah, sorry for dropping this on the floor :(. May I nonetheless ask you to add a test (unittests/Format/FormatTest.cpp)? https://reviews.llvm.org/D15643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

r282448 - [clang-format] Don't allow newline after uppercase Obj-C block return types

2016-09-26 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Sep 26 17:19:08 2016 New Revision: 282448 URL: http://llvm.org/viewvc/llvm-project?rev=282448&view=rev Log: [clang-format] Don't allow newline after uppercase Obj-C block return types Fixes the following: BOOL (^aaa)(void) = ^BOOL { }; The first BOOL's token was get

Re: [PATCH] D15643: [clang-format] Don't allow newline after uppercase Obj-C block return types

2016-09-26 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Committed as r282448. https://reviews.llvm.org/D15643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r283246 - clang-format: Fix bad multi-variable for-loop formatting.

2016-10-04 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 4 15:18:25 2016 New Revision: 283246 URL: http://llvm.org/viewvc/llvm-project?rev=283246&view=rev Log: clang-format: Fix bad multi-variable for-loop formatting. Before: for (int*p, *q; p != q; p = p->next) { After: for (int *p, *q; p != q; p = p->next) { Modif

[PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes

2016-10-04 Thread Daniel Jasper via cfe-commits
djasper added a comment. So sorry. Seems I forgot to hit "Submit" :(. If you don't like the ".first" and ".second" of the pair, you could introduce a struct for it and overload operator<. Might actually be more readable. > WhitespaceManager.cpp:73 > + Tok.NestingLevel, >/*Spaces=

[PATCH] D25171: clang-format: Add two new formatting options

2016-10-04 Thread Daniel Jasper via cfe-commits
djasper added a comment. Could you read: http://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options And provide some evidence about the requirements for new style options? https://reviews.llvm.org/D25171 ___ cfe-commits

[PATCH] D19063: clang-format: Fixed line merging of more than two lines

2016-10-04 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Sorry for the delay. Looks good. https://reviews.llvm.org/D19063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D19066: clang-format: `SpaceAfterTemplate` and `SpacesInBraces` options

2016-10-04 Thread Daniel Jasper via cfe-commits
djasper added a comment. Ping? SpaceAfterTemplateKeyword exists by now. https://reviews.llvm.org/D19066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25162: Make DeletedLines local variables in checkEmptyNamespace.

2016-10-04 Thread Daniel Jasper via cfe-commits
djasper added a comment. I think we should add a test for why this was a problem. IIUC, this is caused by something like: #if a #else #endif namespace { } Because we actually analyze the whole thing twice. https://reviews.llvm.org/D25162 __

[PATCH] D21026: [clang-format] append newline after code when inserting new headers at the end of the code which does not end with newline.

2016-10-04 Thread Daniel Jasper via cfe-commits
djasper added a comment. Ping? https://reviews.llvm.org/D21026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19385: [scan-build] fix warnings emitted on Clang Format code base

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

[PATCH] D21026: [clang-format] append newline after code when inserting new headers at the end of the code which does not end with newline.

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

[PATCH] D25162: Make DeletedLines local variables in checkEmptyNamespace.

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

[PATCH] D25171: clang-format: Add two new formatting options

2016-10-05 Thread Daniel Jasper via cfe-commits
djasper added a comment. Sorry, but that's actually not enough, at least at first sight. With 37 contributors total, bro is still quite small and only 12 of them have more than a handful of commits. And it doesn't have a real style guide. It has: https://www.bro.org/development/contribute.html#

[PATCH] D25171: clang-format: Add two new formatting options

2016-10-05 Thread Daniel Jasper via cfe-commits
djasper added a comment. It's not about whether or not we like the patch. It's whether adding these options is a good trade-off for clang-format overall. If we find that actually more people would find these styles desirable, we can reconsider. I have left some comments anyway in case you want

r283743 - Revert "[x86][inline-asm][clang] accept 'v' constraint"

2016-10-10 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Oct 10 06:40:28 2016 New Revision: 283743 URL: http://llvm.org/viewvc/llvm-project?rev=283743&view=rev Log: Revert "[x86][inline-asm][clang] accept 'v' constraint" This reverts commit r283716. Breaks buildbot: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rl

Re: r283716 - [x86][inline-asm][clang] accept 'v' constraint

2016-10-10 Thread Daniel Jasper via cfe-commits
I have reverted this in r283743 for now. On Mon, Oct 10, 2016 at 1:43 PM, Ismail Donmez via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi, > > On Mon, Oct 10, 2016 at 8:45 AM, Michael Zuckerman via cfe-commits > wrote: > > Author: mzuckerm > > Date: Mon Oct 10 00:45:54 2016 > > New Revis

[PATCH] D25439: Fixed column shift when formatting line containing bit shift operators

2016-10-10 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: test/Format/bitshift-operator-width.cpp:1 +// RUN: grep -Ev "// *[A-Z-]+:" %s | clang-format -style=LLVM \ +// RUN: | FileCheck -strict-whitespace %s Could you move this test into unittests/Format/FormatTest.cpp? htt

r283853 - Explicitly ignore return code in test for test systems that use pipefail

2016-10-10 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Oct 11 01:13:18 2016 New Revision: 283853 URL: http://llvm.org/viewvc/llvm-project?rev=283853&view=rev Log: Explicitly ignore return code in test for test systems that use pipefail Modified: cfe/trunk/test/Driver/show-option-names.c Modified: cfe/trunk/test/Driver/s

Re: r283853 - Explicitly ignore return code in test for test systems that use pipefail

2016-10-11 Thread Daniel Jasper via cfe-commits
On Tue, Oct 11, 2016 at 1:38 PM, Renato Golin wrote: > On 11 October 2016 at 07:13, Daniel Jasper via cfe-commits > wrote: > > Author: djasper > > Date: Tue Oct 11 01:13:18 2016 > > New Revision: 283853 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=283

[PATCH] D7842: Make clang-format-diff compatible with Python 3.4

2016-10-13 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a reviewer: djasper. djasper added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D7842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D20785: Python 3.5 compatibility for clang-format.py

2016-10-13 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. Repository: rL LLVM https://reviews.llvm.org/D20785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D25565: Deduplicate sets of replacements by file names.

2016-10-14 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. I'd not rename the function. Otherwise looks good. https://reviews.llvm.org/D25565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

r311070 - Fix undefined behavior that is caused by not always initializing a bool.

2017-08-16 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Aug 16 23:33:46 2017 New Revision: 311070 URL: http://llvm.org/viewvc/llvm-project?rev=311070&view=rev Log: Fix undefined behavior that is caused by not always initializing a bool. The fix in r310994 is incomplete, as moveFromAndCancel can set the pointer without initial

r328200 - clang-format: Fix SpacesInParentheses with fully qualified names.

2018-03-22 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Mar 22 07:30:28 2018 New Revision: 328200 URL: http://llvm.org/viewvc/llvm-project?rev=328200&view=rev Log: clang-format: Fix SpacesInParentheses with fully qualified names. When SpacesInParentheses is set to true clang-format does not add a space before fully qualified

r328201 - clang-format: Narrow down raw string literal line break exception.

2018-03-22 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Mar 22 07:43:54 2018 New Revision: 328201 URL: http://llvm.org/viewvc/llvm-project?rev=328201&view=rev Log: clang-format: Narrow down raw string literal line break exception. For multiline raw string literals, we generally want to respect the author's choice of linebreak

r317473 - [clang-format] Handle unary operator overload with arguments and specifiers

2017-11-06 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Nov 6 04:11:51 2017 New Revision: 317473 URL: http://llvm.org/viewvc/llvm-project?rev=317473&view=rev Log: [clang-format] Handle unary operator overload with arguments and specifiers Before: int operator++(int)noexcept; After: int operator++(int) noexcept; Patch b

r317901 - [clang-format] Handle leading comments in using declaration

2017-11-10 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Fri Nov 10 09:11:18 2017 New Revision: 317901 URL: http://llvm.org/viewvc/llvm-project?rev=317901&view=rev Log: [clang-format] Handle leading comments in using declaration This fixes clang-format internal assertion for the following code: /* override */ using std::string;

r290084 - clang-format: Allow "single column" list layout even if that violates the

2016-12-18 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Dec 19 01:26:11 2016 New Revision: 290084 URL: http://llvm.org/viewvc/llvm-project?rev=290084&view=rev Log: clang-format: Allow "single column" list layout even if that violates the column limit. Single-column layout basically means that we format the list with one eleme

Re: r290084 - clang-format: Allow "single column" list layout even if that violates the

2016-12-19 Thread Daniel Jasper via cfe-commits
t; SCOP_STAT(NonSimpleMemoryAccess, "Compilated access semantics > (volatile or " > "atomic)" > > As this worked before, this seems to be a regression. > > Best, > Tobias > > On Mon, Dec 19, 2016, at 08:26 A

r290090 - clang-format: Fix regression introduced in r290084.

2016-12-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Dec 19 02:40:56 2016 New Revision: 290090 URL: http://llvm.org/viewvc/llvm-project?rev=290090&view=rev Log: clang-format: Fix regression introduced in r290084. We still want to try in linewrap within single elements of a 1-column list. After: Type *Params[] = {Pointer

r290092 - Revert "[c++1z] P0195R2: Support pack-expansion of using-declarations."

2016-12-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Dec 19 04:09:25 2016 New Revision: 290092 URL: http://llvm.org/viewvc/llvm-project?rev=290092&view=rev Log: Revert "[c++1z] P0195R2: Support pack-expansion of using-declarations." This reverts commit r290080 as it leads to many Clang crashes, e.g.: http://lab.llvm.org:80

r290094 - clang-format: Slightly tweak the behavior of <<-wrapping.

2016-12-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Dec 19 05:14:23 2016 New Revision: 290094 URL: http://llvm.org/viewvc/llvm-project?rev=290094&view=rev Log: clang-format: Slightly tweak the behavior of <<-wrapping. Before: SomeLongLoggingStatementOrMacro() << "Some long text " << s

Re: r290080 - [c++1z] P0195R2: Support pack-expansion of using-declarations.

2016-12-19 Thread Daniel Jasper via cfe-commits
I don't understand. This *is* a revert of the whole patch. On Mon, Dec 19, 2016 at 1:26 PM, Renato Golin wrote: > On 19 December 2016 at 11:28, Daniel Jasper via cfe-commits > wrote: > > I have reverted this in r290092 as it was leading to Clang crashes on the > >

Re: r290080 - [c++1z] P0195R2: Support pack-expansion of using-declarations.

2016-12-19 Thread Daniel Jasper via cfe-commits
Oh, I completely understand, I am doing the same here :) On Mon, Dec 19, 2016 at 1:38 PM, Renato Golin wrote: > On 19 December 2016 at 12:27, Daniel Jasper wrote: > > I don't understand. This *is* a revert of the whole patch. > > My bad, your revert hadn't gone through: > > http://lab.llvm.org:

Re: r290171 - [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-20 Thread Daniel Jasper via cfe-commits
This triggers a bunch of warnings: lib/AST/Expr.cpp:1519:11: error: enumeration value 'CK_ZeroToOCLQueue' not handled in switch [-Werror,-Wswitch] lib/CodeGen/CGExprConstant.cpp:654:13: error: enumeration value 'CK_ZeroToOCLQueue' not handled in switch [-Werror,-Wswitch] lib/Edit/RewriteObjC

r290173 - Revert "[OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand."

2016-12-20 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Dec 20 04:05:04 2016 New Revision: 290173 URL: http://llvm.org/viewvc/llvm-project?rev=290173&view=rev Log: Revert "[OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand." This reverts commit r290171. It triggers a bunch of warnings, because the new enumerator

Re: r290171 - [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-20 Thread Daniel Jasper via cfe-commits
Reverted in rL290173. On Tue, Dec 20, 2016 at 11:02 AM, Daniel Jasper wrote: > This triggers a bunch of warnings: > > lib/AST/Expr.cpp:1519:11: error: enumeration value 'CK_ZeroToOCLQueue' > not handled in switch [-Werror,-Wswitch] > lib/CodeGen/CGExprConstant.cpp:654:13: error: enumeration

r290177 - clang-format: Fix bug in understanding string-label&value analysis.

2016-12-20 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Dec 20 09:27:46 2016 New Revision: 290177 URL: http://llvm.org/viewvc/llvm-project?rev=290177&view=rev Log: clang-format: Fix bug in understanding string-label&value analysis. While for <<-operators often used in log statments, a single key value pair is always on the se

r290259 - clang-format: Fix bug in handling of single-column lists.

2016-12-21 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Dec 21 11:02:06 2016 New Revision: 290259 URL: http://llvm.org/viewvc/llvm-project?rev=290259&view=rev Log: clang-format: Fix bug in handling of single-column lists. Members that are themselves wrapped in fake parentheses would lead to AvoidBinPacking be set on the wrong

r290337 - clang-format: Less eagerly try to keep label-value pairs on a line.

2016-12-22 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Dec 22 06:37:06 2016 New Revision: 290337 URL: http://llvm.org/viewvc/llvm-project?rev=290337&view=rev Log: clang-format: Less eagerly try to keep label-value pairs on a line. Before: string v = StrCat("aaa: ", SomeFunction(,

r290842 - Remove isIgnored()-test that is more expensive than the analysis behind it

2017-01-02 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jan 2 16:55:45 2017 New Revision: 290842 URL: http://llvm.org/viewvc/llvm-project?rev=290842&view=rev Log: Remove isIgnored()-test that is more expensive than the analysis behind it In many translation units I have tried, the calls to isIgnored() removed in this patch a

r291434 - clang-format: Improve support for override/final as variable names.

2017-01-09 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jan 9 05:04:07 2017 New Revision: 291434 URL: http://llvm.org/viewvc/llvm-project?rev=291434&view=rev Log: clang-format: Improve support for override/final as variable names. Before: bool a = f() &&override.f(); bool a = f() &&final.f(); void f(const MyOverride &

Re: [PATCH] D23602: Port tools/clang-format/git-clang-format to work Python beyond 2.7

2016-08-18 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. Looks good. Repository: rL LLVM https://reviews.llvm.org/D23602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes

2016-08-19 Thread Daniel Jasper via cfe-commits
djasper added a comment. I think instead of doing some complex computation with LineLevel and NestingLevel, it might be better to just leave them as the pair and compare them as a pair. The LineLevel should probably always trump the NestingLevel. So, I'd try to just defined ScopeLevel as a pair

Re: [PATCH] D23714: clang-format: [JS] handle object literals with casts.

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

Re: [PATCH] D23761: clang-format: [JS] supports casts to types starting with punctuation ("{[(").

2016-08-22 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Please add a "before" and "after" to the patch description before submitting. Otherwise looks good. https://reviews.llvm.org/D23761 ___ cfe-co

Re: [PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes

2016-08-22 Thread Daniel Jasper via cfe-commits
djasper added a comment. I think the IndentLevel in WhitespaceManager (and the nested Change) is a horrible mess and should be cleaned up. It gets set either to 0 or to the "Level" of the AnnotatedLine. To me only the latter makes sense as the line defines the indent level. Everything else, inc

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Daniel Jasper via cfe-commits
djasper added a subscriber: djasper. djasper added a comment. Sorry for the long silence. Manuel is currently out on vacation. I am not entirely sure how we want to make progress at this point. There seems to be consensus that in the mid-term, this should go into the clang-refactor tool. Howeve

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Daniel Jasper via cfe-commits
djasper added a comment. Ben: I am happy to have this as a separate tool until then. But if we go that route, let's add very explicit comments about this so that people don't start depending on it and we can actually remove it as easily as possible. Alex: I don't think there will be a significa

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Daniel Jasper via cfe-commits
djasper added a comment. I think quite a bit of the complexity in this patch stems from the two different ways to format the input (defining the field order or alternatively defining the new index of specific fields). Do we really need both? If not, I'd remove one of them for now (likely the in

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Daniel Jasper via cfe-commits
djasper added a comment. Sorry, didn't have much time so far, will give this some more review later today. One thing those is that the code could do with a bit more comments. It would help reviewing (and future maintenance) of functions such as reorderFieldsInConstructor to have brief comment (

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Daniel Jasper via cfe-commits
djasper added a comment. I am serious about writing more comments. Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:41 @@ +40,3 @@ + } + if (Results.size() != 1) { +errs() << "The name " << RecordName Make this "> 1" instead of "!= 1". Not really i

Re: [PATCH] D23279: clang-reorder-fields

2016-08-24 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:137 @@ +136,3 @@ +std::end(NewWrittenInitializersOrder), ByFieldNewPosition); + assert(OldWrittenInitializersOrder.size() == + NewWrittenInitializersOrder.size());

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

2016-08-24 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. Sorry for the delay! Comment at: lib/Format/FormatTokenLexer.h:68 @@ +67,3 @@ + // embedding expressions nested in ${expr-here}. Template strings can be + // n

Re: [PATCH] D23279: clang-reorder-fields

2016-08-26 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:29 @@ +28,3 @@ +using namespace llvm; +using namespace clang; +using namespace clang::ast_matchers; Put everything here into the namespace clang and remove "using namespace cl

Re: [PATCH] D23279: clang-reorder-fields

2016-08-30 Thread Daniel Jasper via cfe-commits
djasper added a comment. Probably the last round .. Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:202 @@ +201,3 @@ +for (const auto *C : RD->ctors()) { + if (C->isImplicit() || C->isDelegatingConstructor()) +continue; alexshap wrote:

r280165 - clang-format: Correctly calculate affected ranges when sorting #includes.

2016-08-30 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Aug 30 16:33:41 2016 New Revision: 280165 URL: http://llvm.org/viewvc/llvm-project?rev=280165&view=rev Log: clang-format: Correctly calculate affected ranges when sorting #includes. affectedRanges takes a start and an end offset, not offset and length. Modified: cfe

Re: [PATCH] D23279: clang-reorder-fields

2016-08-30 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:178 @@ +177,3 @@ +const InitListExpr *InitListEx, ArrayRef NewFieldsOrder, +const ASTContext &Context, +std::map &Replacements) { alexshap wrote: > yeah, i am aware

Re: [PATCH] D23279: clang-reorder-fields

2016-08-30 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Now that you can, you should add test cases for the different cases where you cannot reorder fields. Otherwise looks good. Repository: rL LLVM https://reviews.llvm.org/D23279 ___

Re: [PATCH] D23279: clang-reorder-fields

2016-08-30 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:179 @@ +178,3 @@ +const ASTContext &Context, +std::map &Replacements) { + assert(InitListEx && "Init list expression is null"); alexshap wrote: > >Also, I don't unders

Re: [PATCH] D23279: clang-reorder-fields

2016-08-30 Thread Daniel Jasper via cfe-commits
djasper added a comment. As per my comment, please add tests for cases where you currently don't do re-ordering (different access specifiers, partial initializers). Other than that, yes, this is fine to commit. Repository: rL LLVM https://reviews.llvm.org/D23279 _

Re: [PATCH] D23279: clang-reorder-fields

2016-08-31 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:181 @@ +180,3 @@ + assert(InitListEx && "Init list expression is null"); + // we care only about brace initializations + // which have valid source locations Write full sent

Re: [PATCH] D23279: clang-reorder-fields

2016-08-31 Thread Daniel Jasper via cfe-commits
djasper added a comment. Looks good :). Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r280245 - clang-format: Set default WebKit style to use C++11.

2016-08-31 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Aug 31 09:05:56 2016 New Revision: 280245 URL: http://llvm.org/viewvc/llvm-project?rev=280245&view=rev Log: clang-format: Set default WebKit style to use C++11. The WebKit style page says to use nullptr, so this should be fine: https://webkit.org/code-style-guidelines/

Re: [PATCH] D24155: clang-format: [JS] merge requoting replacements.

2016-09-02 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Basically looks good. Comment at: lib/Format/Format.cpp:806 @@ -805,2 +805,3 @@ FormatTokenLexer &Tokens, tooling::Replacements &Result) override { +tooling::

Re: [PATCH] D23972: clang-format: [JS] Sort all JavaScript imports if any changed.

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

Re: [PATCH] D23973: clang-format: [JS] handle default bindings in imports.

2016-09-02 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. It would be helpful to have a before/after to review these patches. https://reviews.llvm.org/D23973 ___ cfe-commits mailing list cfe-commits@li

Re: [PATCH] D24257: clang-format: [JS] ignore comments when wrapping returns.

2016-09-06 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/TokenAnnotator.cpp:2384 @@ -2383,2 +2383,3 @@ } else if (Style.Language == FormatStyle::LK_JavaScript) { -if (Left.is(tok::kw_retur

Re: [PATCH] D24272: clang-format: [JS] whitespace required between ! and as.

2016-09-06 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/D24272 ___ 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   >