djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:329
+ return nullptr;
+// C++17 '[[using namespace: foo, bar(baz, blech)]]'
+bool IsUsingNamespace =
Can you make this:
// C++17 '[[using : foo, bar(baz, blech)]]'
To make
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Nice.. Removed a lot of complexity :). Let's see whether this heuristic is good
enough.
Comment at: lib/Format/TokenAnnotator.cpp:210
-bool MightBeFunctionType = !Co
djasper accepted this revision.
djasper added a comment.
Ok, looks good.
Repository:
rC Clang
https://reviews.llvm.org/D43902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper added a comment.
I'd really like to not parse include/import statements this way. Can you send
me examples of headers where we fail to recognize them as ObjC and this matters
(happy for you to send me examples offline).
Repository:
rC Clang
https://reviews.llvm.org/D44634
___
djasper added inline comments.
Comment at: lib/Format/Format.cpp:1450
// Keep this array sorted, since we are binary searching over it.
static constexpr llvm::StringLiteral FoundationIdentifiers[] = {
"CGFloat",
I have concerns about this growi
djasper added inline comments.
Comment at: lib/Format/Format.cpp:1450
// Keep this array sorted, since we are binary searching over it.
static constexpr llvm::StringLiteral FoundationIdentifiers[] = {
"CGFloat",
benhamilton wrote:
> jolesiak wr
djasper added a comment.
The normal rule for formatting options apply. If you can dig up a public style
guide and a project of reasonable size where it is used, we can add an option.
Repository:
rC Clang
https://reviews.llvm.org/D42787
___
cfe-c
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good. Sorry for the delay.
Repository:
rC Clang
https://reviews.llvm.org/D43015
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
djasper added a comment.
You are right that this behavior is what the code authors, but also many other
people, like to have and so it is what is engrained in clang-format. There are
likely about a million things that fall into the same category. Now we might
find that the current default is ac
djasper added a comment.
Ok, I think I agree with both of you to a certain extent, but I also think this
change as is, is not yet right.
First, it does too much. The original very first example in this CL is actually
not produced by clang-format (or if it is, I don't know with which flag
combi
djasper added a comment.
In https://reviews.llvm.org/D52676#1268748, @oleg.smolsky wrote:
> In https://reviews.llvm.org/D52676#1268706, @djasper wrote:
>
> > Ok, I think I agree with both of you to a certain extent, but I also think
> > this change as is, is not yet right.
> >
> > First, it do
djasper added inline comments.
Comment at: unittests/Format/FormatTest.cpp:11604
+ " x.end(), //\n"
+ " [&](int, int) { return 1; });\n"
"}\n");
oleg.smolsky wrote:
> krasimir wrote:
> > This looks a bit sus
djasper added a comment.
I think this roughly looks fine. Krasimir, any thoughts?
Comment at: unittests/Format/FormatTest.cpp:11854
+ // case above.
+ {
+auto Style = getGoogleStyle();
No need to use a scope here. Feel free to redefine Style.
If in fact
djasper added a comment.
Ok, but this behavior is still intended. You are setting clang-format to a
format where it is breaking after binary operators and then added a break
before a binary operator. clang-format assumes that this is not intended and
that you will want this cleaned up.
E.g.:
djasper added a comment.
Does this also work for _asm and __asm?
Repository:
rC Clang
https://reviews.llvm.org/D54795
___
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. Thank you.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60558/new/
https://reviews.llvm.org/D60558
__
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
Comment at: lib/Format/UnwrappedLineParser.cpp:2099
+ // After a protocol list, we can have a category (Obj-C generic
+ // category).
nit:
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Yay for *removing* complexity for a change :).
Let me know how it goes in practice.
https://reviews.llvm.org/D37142
___
cfe-commits mailing lis
djasper added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:1139
+
+ // On lines containing template strings, propagate NoLineBreak even for dict
+ // and array literals. This is to force wrapping an initial function call if
This is not the r
djasper added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:1139
+
+ // On lines containing template strings, propagate NoLineBreak even for dict
+ // and array literals. This is to force wrapping an initial function call if
mprobst wrote:
>
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/D37143
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/ma
djasper added a comment.
Are you changing the line endings here? Phabricator tells me that basically all
the lines change. If so, please don't ;).
Comment at: lib/Format/TokenAnnotator.cpp:345
+
+FormatToken *PreviousNoneOfConstVolatileReference = Parent;
+while (Previ
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Just a few minor comments, otherwise looks good.
Comment at: lib/Format/Format.cpp:1542
+bool likelyXml(StringRef Code) {
+ return Code.ltrim().startswith("<");
djasper added a comment.
Note that these changes need to be made to the corresponding comments in
include/clang/Format/Format.h and then this file is auto-generated with
docs/tools/dump_format_style.py.
Comment at: docs/ClangFormatStyleOptions.rst:274
**AllowAllParametersOfD
djasper added a comment.
This change needs to be made to include/clang/Format/Format.h and then the rst
file needs to be regenerated with docs/tools/dump_format_style.py.
https://reviews.llvm.org/D37531
___
cfe-commits mailing list
cfe-commits@list
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D37531
___
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.
Thank you.
https://reviews.llvm.org/D37558
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Also run dump_format_style.py and keep the changed .rst file in this change.
Otherwise looks good.
https://reviews.llvm.org/D37513
___
cfe-com
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good. Sorry for the delay.
https://reviews.llvm.org/D37132
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/
djasper accepted this revision.
djasper added a comment.
Submitted as r312721. Thank you.
https://reviews.llvm.org/D37513
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper added a comment.
I am very strongly against a flag that just leaves the line break as is. What's
the motivation?
https://reviews.llvm.org/D37260
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/l
djasper added a comment.
I have a slightly hard time grasping what this patch now actually does? Doesn't
it simply try to decide whether or not to make a split locally be comparing the
PenaltyBreakComment against the penalty for the access characters? If so,
couldn't we simply do that as an imp
djasper added a comment.
BraceWrapping.AfterExternC makes sense to me.
https://reviews.llvm.org/D37260
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper added a comment.
I'd still prefer individual patches for each of these changes. If the code
review system or VCS make it hard for you to deal with two adjacent changes
this way, do them in sequence.
Adding Manuel as a reviewer who has a longer term idea on how to handle macros.
https:
djasper added a comment.
I still don't understand yet. breakProtrudingToken has basically two options:
1. Don't wrap/reflow: In this case the penalty is determined by the number of
excess characters.
2. Wrap/reflow: I this case the penalty is determined by PenaltySplitComments
plus the remainin
djasper added inline comments.
Comment at: lib/Format/FormatTokenLexer.cpp:642
tok::pp_define) &&
-std::find(ForEachMacros.begin(), ForEachMacros.end(),
- FormatTok->Tok.getIdentifierInfo()) != ForEachMacros.end()) {
- FormatTok->Type
djasper added a comment.
I think doing the computation twice is fine. Or at least, I'd need a test case
where it actually shows substantial overhead before doing what you are doing
here. Understand that creating more States and making the State object itself
larger also has cost and that cost o
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Generally, upload patches with the full file as context (that will prevent
Phabricator's "Context not available")
But this change looks good. Thank you.
Repository:
rC Clang
CHANGES SINC
djasper added a comment.
I don't quite understand. What you are describing should already be the
behavior with ColumnLimit=0 and I think your test should pass without the new
option. Doesn't it?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D53072/new/
https://reviews.llvm.org/D53072
djasper added a comment.
$ cat /tmp/test.cc
int foo(int a,
int b) {
f();
}
$ clang-format -style="{ColumnLimit: 0}" /tmp/test.cc
int foo(int a,
int b) {
f();
}
Is this not what you want? If so, in what way?
CHANGES SINCE LAST ACTION
https://
djasper added a comment.
Without understanding this in more detail I do not know how to move forward
with this. What this patch is describing is what should already be the case
with ColumnLimit set to zero. If it isn't this might be a bug or there might be
a different way to move forward. Howev
djasper added a comment.
This seem to conceptually be a list of things rather than an array subscript,
though, right? Could we alternatively set SpacesInContainerLiterals to false
for LK_TableGen?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55964/new/
https:
djasper added a comment.
Look at getGoogleStyle(). It has a bunch of language-specific configs at the
bottom. You can do the same for TableGen in getLLVMStyle().
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55964/new/
https://reviews.llvm.org/D55964
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:2357
+ return false;
+else
+ // Protocol list -> space if configured. @interface Foo : Bar
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
Repository:
rC Clang
https://reviews.llvm.org/D45521
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.o
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: unittests/Format/FormatTest.cpp:7666
FormatStyle Style = getLLVMStyle();
+ // ObjC ignores IndentWrappedFunctionNames when wrapping methods.
Style.In
djasper added a comment.
Both patch and comment inside patch say "break after closing paren" and yet
that's not what the test or example in the description actually do. Why is that?
Repository:
rC Clang
https://reviews.llvm.org/D45526
___
cfe-co
djasper added a comment.
I understand that, but the test example does not break after the closing paren.
It breaks after the subsequent "<".
Repository:
rC Clang
https://reviews.llvm.org/D45526
___
cfe-commits mailing list
cfe-commits@lists.llvm
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:2276
+ // In Objective-C type declarations, prefer breaking after the category's
+ // close paren instead of after t
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
Comment at: lib/Format/NamespaceEndCommentsFixer.h:24
+// Finds the namespace token corresponding to a closing namespace `}`, if that
+// is to be formatted.
djasper added inline comments.
Comment at: include/clang/Format/Format.h:154
+ /// \brief If a function call, initializer list, or template
+ /// argument list doesn't fit on a line, allow putting all
writing just "initializer list" is confusing, especially n
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good, thank you.
Repository:
rC Clang
https://reviews.llvm.org/D46143
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://l
djasper added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:44
+ int MatchingStackIndex = Stack.size() - 1;
+ while (MatchingStackIndex >= 0 && Stack[MatchingStackIndex].Tok != &Tok)
+--MatchingStackIndex;
I think this needs a long explan
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Generally looks good.
Comment at: lib/Format/ContinuationIndenter.cpp:93
+ break;
+if (End->Next->is(tok::r_brace)) {
+ const ParenState *State = FindParenSta
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
Repository:
rC Clang
https://reviews.llvm.org/D48363
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.o
djasper added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:760
(!Style.AllowAllParametersOfDeclarationOnNextLine &&
State.Line->MustBeDeclaration) ||
+(!Style.AllowAllArgumentsOnNextLine &&
russellmcc wrote:
> djaspe
djasper added inline comments.
Comment at: unittests/Format/FormatTest.cpp:3444
+
+ verifyFormat("Constructor()\n"
+ ": (a), b(b) {}",
djasper wrote:
> I find these tests hard to read and reason about. Ho
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D40424
___
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.
Repository:
rC Clang
https://reviews.llvm.org/D40642
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.o
djasper added inline comments.
Comment at: include/clang/Format/Format.h:1216
+LK_TextProto,
+/// Do not use. Keep at last position.
+LK_End,
Lets find a way to implement without this in the public header file.
Comment at: include/c
djasper added inline comments.
Comment at: include/clang/Format/Format.h:1375
+std::vector EnclosingFunctionNames;
+/// \brief The canonical delimiter for this language.
+std::string CanonicalDelimiter;
krasimir wrote:
> djasper wrote:
> > Can you pul
djasper added a comment.
Could you explain this in more detail? Which subtraction is underflowing? Why
can't we just add a ternary expression there to handle the case?
https://reviews.llvm.org/D36019
___
cfe-commits mailing list
cfe-commits@lists.l
djasper added a comment.
Please add all the tests into unittests/Format/FormatTest.cpp instead. We use
FileCheck-based tests only to verify the behavior of the clang-format binary
itself.
https://reviews.llvm.org/D35743
___
cfe-commits mailing lis
djasper added inline comments.
Comment at: docs/ClangFormatStyleOptions.rst:1182
+**IndentPPDirectives** (``bool``)
+ Indent preprocessor directives on conditionals.
I think we can foresee that a bool is not going to be enough here. Make this an
enum, which f
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D36131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/SortJavaScriptImports.cpp:416
break;
- if (Current->isNot(tok::identifier))
+ if (Current->isNot(tok::identifier) && Current->
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
LG
https://reviews.llvm.org/D36144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
LG
https://reviews.llvm.org/D36146
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
LG
https://reviews.llvm.org/D36147
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:2355
+(Left.Tok.getIdentifierInfo() ||
+ Left.isOneOf(tok::kw_switch, tok::kw_case, tok::kw_delete)))
+ return false;
Why is instanceof not required in this list?
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:2009
+// Prefer breaking call chains (".foo") over empty "{}", "[]" or "()".
+if ((Left.is(tok::l_brace) && Right.is(tok::r_brace)) ||
+(Left.is(tok::l_square) && Right.is(tok::r_square)) ||
djasper added a comment.
Generally, please upload patches with full context to phabricator. (or use arc)
I think this approach is a bit inside out. We are in a codepath where we try to
find a lambda introducer and we the look one or two tokens back to see that we
aren't as we have seen "auto".
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D36148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
djasper added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:383
+ Current.Previous->is(tok::hash) && State.FirstIndent > 0) {
+// subtract 1 so indent lines up with non-preprocessor code
+Spaces += State.FirstIndent;
euhlmann wrote
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:650
+for (unsigned i = 0; i < Newlines; ++i)
+ Text.append(UseCRLF ? " \\\r\n" : " \\\n");
+return;
Note that when you have an empty line, this would turn into:
#define A
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Thanks you.
Comment at: lib/Format/WhitespaceManager.cpp:650
+for (unsigned i = 0; i < Newlines; ++i)
+ Text.append(UseCRLF ? " \\\r\n" : " \\\n");
+return;
--
djasper added a comment.
Manuel: Can you take a look at the last comment here? Why does PPBranchLevel
start at -1?
https://reviews.llvm.org/D35955
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinf
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
LG
https://reviews.llvm.org/D36491
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
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/D34324
___
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/D36684
___
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/D36142
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
djasper added inline comments.
Comment at: unittests/Format/FormatTest.cpp:2281
TEST_F(FormatTest, LayoutMacroDefinitionsStatementsSpanningBlocks) {
verifyFormat("#define A \\\n"
mzeren-vmw wrote:
> mzeren-vmw wrote:
> > Experimenting with the patch locally
djasper added inline comments.
Comment at: lib/Format/BreakableToken.cpp:553
StringRef TrimmedContent = Content[LineIndex].ltrim(Blanks);
- return getReflowSplit(TrimmedContent, ReflowPrefix, PreviousEndColumn,
-ColumnLimit);
+ Split TrimmedSplit = ge
djasper added inline comments.
Comment at: lib/Format/FormatToken.h:397
+ (!Previous ||
+ Previous->isOneOf(tok::comma, tok::equal, tok::l_brace) ||
+ Next->is(tok::r_brace;
Is this list coming from existing tests?
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Thank you
https://reviews.llvm.org/D37011
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinf
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
If no tests break with this, lets just go for it. We can follow up and fix
individual cases if we find undesired behavior.
https://reviews.llvm.org/D37007
___
djasper added a comment.
Krasimir: Can you actually give this a round of review? I will also try to do
so tomorrow.
https://reviews.llvm.org/D35955
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D36956
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
djasper added inline comments.
Comment at: unittests/Format/FormatTest.cpp:2297
+ "#include \n"
+ "#define MACRO
"
+ "\\\n"
Please just set Style.ColumnLim
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Does the test still test the same thing if you set the column limit to 60 and
remove 20 spaces? If not, this is fine.
https://reviews.llvm.org/D37109
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
From my side this looks good for now (we can always improve more later).
Krasimir, what do you think?
https://reviews.llvm.org/D35955
___
cfe-
djasper added a comment.
Sorry for being a bit late here and thanks @klimek for bringing this to my
attention.
This has been years ago, but if I reconstruct my thinking (and look at the test
cases), then I'd say that "left" alignment should not be applied to
multi-variable decl statements ever.
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Please generally upload diffs with the full file as context so that Phabricator
can properly expand the context where necessary.
This looks good, though.
Repository:
rC Clang
https://re
djasper accepted this revision.
djasper added a comment.
Looks good.
Repository:
rC Clang
https://reviews.llvm.org/D44692
___
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.
Looks good.
Repository:
rC Clang
https://reviews.llvm.org/D44632
___
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.
Generally looks good.
Comment at: lib/Format/TokenAnnotator.cpp:2183
return 0;
+if (Left.Previous && Left.Previous->is(tok::equal) &&
+!Style.Cpp11Braced
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Some last comments, but basically looks good.
Comment at: include/clang/Format/Format.h:352
- /// \brief If ``true``, always break after the ``template<...>`` of a
temp
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good, thank you!
Comment at: lib/Format/Format.cpp:1517
-for (auto &Line : AnnotatedLines) {
- for (FormatToken *FormatTok = Line->First; FormatTok;
+a
djasper added inline comments.
Comment at: cfe/trunk/lib/Format/Format.cpp:1544
+return true;
+ for (auto ChildLine : Line->Children) {
+if (LineContainsObjCCode(*ChildLine))
Sorry that I missed this in the original review. But doesn't this s
djasper added inline comments.
Comment at: lib/Format/Format.cpp:1542
};
-for (auto Line : AnnotatedLines) {
- if (LineContainsObjCCode(*Line))
+llvm::DenseSet LinesToCheckSet;
+LinesToCheckSet.reserve(AnnotatedLines.size());
Wouldn't it be
101 - 200 of 423 matches
Mail list logo