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
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
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
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/
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.
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'
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
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
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)
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
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
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
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
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
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 //
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
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
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
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(),
-
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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=
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
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/
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
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
__
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
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
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
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
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#
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
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
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
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
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
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
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
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
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
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
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
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
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
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;
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
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
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
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
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
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
> >
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:
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
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
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
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
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
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(,
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
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 &
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
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
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
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
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
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
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
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
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 (
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
djasper added inline comments.
Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:137
@@ +136,3 @@
+std::end(NewWrittenInitializersOrder), ByFieldNewPosition);
+ assert(OldWrittenInitializersOrder.size() ==
+ NewWrittenInitializersOrder.size());
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
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
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:
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
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
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
___
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
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
_
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
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
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/
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::
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
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
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
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 - 100 of 731 matches
Mail list logo