djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
One nit, otherwise looks good.
Comment at: lib/Format/UnwrappedLineFormatter.cpp:368
// We don't merge short records.
- if (Line.First->isOneOf(tok::kw_class, t
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D33006
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
djasper added a comment.
Please read and address:
https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options
https://reviews.llvm.org/D33029
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D32997
___
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.
Submitted as r302427.
https://reviews.llvm.org/D32475
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mai
djasper closed this revision.
djasper added a comment.
Submitted as r302428.
https://reviews.llvm.org/D32733
___
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.
Thanks
https://reviews.llvm.org/D32864
___
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 inline comments.
This revision is now accepted and ready to land.
Comment at: unittests/Format/FormatTestJS.cpp:1791
+TEST_F(FormatTestJS, Exponentiation) {
+ verifyFormat("squared = x ** 2;");
+}
Also make this hand
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
This is an edge case in actual C++. An escaped newline literally gets expanded
to nothing. So what this reads is
#define Onetwo \
...
https://reviews.llvm.org/D32733
___
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:523
+ if (C.NewlinesBefore > 0 && C.ContinuesPPDirective)
+C.EscapedNewlineColumn = C.PreviousEndOfTokenColumn + 2;
+return;
I think we should not duplicate this loop. Tw
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:1043
- // Parse function literal unless 'function' is the first token in a line
- // in which case th
djasper added a comment.
My point is though that even with only one argument, the BinPackArguments
setting might lead to this bug. If not, that's good :).
https://reviews.llvm.org/D32475
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http:
djasper added a comment.
What happens if the function call where this happens actually does not have
multiple parameters but one parameter with many operands, e.g. changing your
test case to:
arg3 + is + quite + long + so + it
+ f(arguments << of << its << su
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D32531
___
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/D32532
___
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/WhitespaceManager.cpp:431
+
+ // Special case for AlignTokens: for all other alignment cases,
+ // the current sequence is ended when a comma or a scope change
enyquist wrote:
> djasp
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Sounds good.
https://reviews.llvm.org/D32298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/list
djasper added inline comments.
Comment at: include/clang/Format/Format.h:1519
+ /// formatted due to a non-recoverable syntax error.
+ bool IncompleteFormat = false;
+
Maybe we should invert this and make this FormatComplete or something?
Otherwise this is bou
djasper added inline comments.
Comment at: include/clang/Format/Format.h:1527
+/// non-recoverable syntax error.
tooling::Replacements reformat(const FormatStyle &Style, StringRef Code,
ArrayRef Ranges,
This is a public interface
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:413
+
+ while (Param && !Param->is(tok::l_paren)) {
+if (!Param->is(tok::identifier) && !Param->is(tok::comma))
enyquist wrote:
> djasper wrote:
> > enyquist wrote:
> > > djasper wro
djasper added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:11652
static bool ShouldWarnAboutMissingPrototype(const FunctionDecl *FD,
- const FunctionDecl*& PossibleZeroParamPrototype) {
+ const FunctionDecl*& Possible
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:255
+// If PointerAlignment is PAS_Right, keep *s or &s next to the token
+if (Style.PointerAlignment == FormatStyle::PAS_Right &&
+Changes[i].Spaces != 0) {
This needs to
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Yes, thank you!
https://reviews.llvm.org/D31408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/l
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good. Thanks for cleaning this up.
https://reviews.llvm.org/D31706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.l
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/TokenAnnotator.cpp:2275
+ tok::kw_const) ||
+ // "of" can only occur in a for loop, as a "const x of y".
+ (
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
looks good
https://reviews.llvm.org/D31575
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
djasper added a comment.
Generally please upload diffs with more contexts. For some here it's not even
clear to which option they refer ;)
Comment at: docs/ClangFormatStyleOptions.rst:941
+ ContinuationIndentWidth: 2
+ ColumnLimit: 15
+
You could force
djasper added a comment.
Thank you for working on this. Unfortunately, this is done at the wrong level:
- You are using a separate pass, which means that as soon as the preprocessor
directives exceed the column limit, they won't be wrapped correctly.
- You aren't using Clang's Lexer to separate
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:413
+
+ while (Param && !Param->is(tok::l_paren)) {
+if (!Param->is(tok::identifier) && !Param->is(tok::comma))
enyquist wrote:
> djasper wrote:
> > I think you should be able to use
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:287
SmallVector
&Changes,
+bool ConsiderScope, bool ConsiderCommas,
unsigned StartAt) {
I don't find
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.. Very nice :)
Comment at: lib/Tooling/Refactoring/AtomicChange.cpp:102
+ Code.substr(StartPos, EndPos - StartPos).split(Lines, '\n');
+ for (llvm::StringRef L
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good, just minor remarks.
Comment at: include/clang/Format/Format.h:974
+ ///# With:
+ ///MacroBlockBegin: "^\
+ ///NS_MAP_BEGIN|\
I'd
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
Comment at: docs/tools/dump_format_style.py:67
def __str__(self):
-return '* ``%s`` %s' % (self.name, doxygen2rst(self.comment))
+return '\n* ``%s``
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D30883
___
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/D30874
___
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/TokenAnnotator.cpp:2666
return true;
+ if (Left.is(TT_InheritanceComma) &&
+ Style.BreakBeforeInheritanceComma)
Do these now fit on one line?
Repository:
rL LLVM
https://reviews.llvm.org/D30487
djasper added inline comments.
Comment at: include/clang/Tooling/Refactoring/AtomicChange.h:139
+ // kNone: Don't format anything.
+ // kViolations: Format lines exceeding 80 columns.
+ enum FormatOption { kAll, kNone, kViolations };
Should probably be "exceed
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
A few nits, otherwise looks good.
Comment at: include/clang/Format/Format.h:426
+ /// \brief If ``true``, in the class inheritance expression clang-format will
+ /// brea
djasper added a comment.
I think the patch is fine, except for the name of the flag. It is not breaking
inheritance ;).
Maybe BreakBeforeInhertianceColonAndComma, but that's pretty long still. I
think maybe we can shorten this to BreakBeforeInhertianceComma, as it never
makes sense to break be
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D30740
___
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 upload patches with full context or use arc
(https://secure.phabricator.com/book/phabricator/article/arcanist/).
Generally looks good, just minor comments.
Comment
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D30575
___
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:852
+ bool CanBreakProtrudingToken =
+ State.Stack.empty() || (!State.Stack.back().NoLineBreak &&
+ !State.Stack.back().NoLineBreakInOperand);
I thin
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/TokenAnnotator.cpp:1056
+} else if (Current.is(tok::exclaim)) {
+ if (Style.Language == FormatStyle::LK_JavaScript) {
+if (Curre
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:2292
return false;
-// Postfix non-null assertion operator, as in `foo!.bar()`.
-if (Right.is(tok::exclaim) && (Left.isOneOf(tok::identifier, tok::r_paren,
-
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Minor nit, otherwise looks good.
Comment at: lib/Format/NamespaceEndCommentsFixer.cpp:152
+const FormatToken *EndCommentNextTok = EndCommentPrevTok->Next;
+if (EndC
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Would probably be interesting to add these test cases:
#if A
namespace A {
#else
namespace B {
#endif
int i;
int j;
}//namespace A
and:
namespace A {
int i;
int j;
#
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good. Thank you for doing this!
https://reviews.llvm.org/D30532
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm
djasper added a comment.
Hm. Unfortunately, this seems to have been implemented to support Webkit style
and Webkit style is explicit about wanting this
(https://webkit.org/code-style-guidelines/) :(.
But maybe the solution to that is to add an extra flag like
AlwaysWrapInitializerList. Really
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:2486
Style.BreakConstructorInitializersBeforeComma &&
!Style.ConstructorInitializerAllOnOneLineOrOnePerLine)
At any rate, I think this is what makes single-item ctor init lists
djasper added a comment.
Do you know whether that is intentional? The style guide isn't really
conclusive.
Repository:
rL LLVM
https://reviews.llvm.org/D30487
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/
djasper added a comment.
Before `'`? Can you give an example?
Repository:
rL LLVM
https://reviews.llvm.org/D30487
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper added a comment.
I agree, just generally we should aim for keeping these short.
The example you gave might actually be reasonable to compare in two columns,
i.e.:
true: false:
SomeClass::Constructor() vs. SomeClass::Constructor() : a(a),
djasper added inline comments.
Comment at: include/clang/Format/Format.h:309
+ /// inheritance.
+ bool BreakInhertianceBeforeColonAndComma;
+
Abpostelnicu wrote:
> djasper wrote:
> > Hm. I am still not sure about this flag and it's name. Fundamentally, this
djasper added a comment.
Sure, then go ahead. If these examples would have helped you, that's one
datapoint :).
As for presenting the difference in options, that would be useful I think. So
if you are up to also doing that, that'd be appreciated.
For bool options it seems easiest to do somethin
djasper added a comment.
Hm. I don't actually know whether these examples are useful as is. You only
present one setting of the value in most cases. What's interesting is actually
how the flag changes the behavior. I mean in most cases, this can be derived
from the example, but in those cases,
djasper requested changes to this revision.
djasper added a comment.
This revision now requires changes to proceed.
So, while it might be convenient to view this all in one file, a test here is
not convenient for me (or presumably other clang-format developers) to work
with. You can make a prett
djasper added inline comments.
Comment at: include/clang/Format/Format.h:309
+ /// inheritance.
+ bool BreakInhertianceBeforeColonAndComma;
+
Hm. I am still not sure about this flag and it's name. Fundamentally, this is
currently controlling two different th
djasper added a comment.
Please don't add this as is. I don't usually run the file-based tests in my
development workflow and suspect that I might be breaking this a lot.
If you want something like this, please add it as unittest(s) in
unittests/Format/... (either in a new file or in an existin
djasper added a comment.
As discussed offline, I think this solves the wrong problem. My guess is that
breakProtrudingToken checks State.Stack.back().NoLinebreak, but I forget to
make it also check NoLinebreakInOperand.
https://reviews.llvm.org/D30492
___
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Please include the reasoning in the patch description, i.e. that otherwise
clang-format might need to runs to add all the namespace comments.
https://reviews.llvm.org/D30528
djasper added a comment.
Could you please upload a diff with the entire file as context? That makes
reviewing this easier.
Comment at: docs/ClangFormatStyleOptions.rst:428
+**BreakBeforeInhertianceDelimiter** (``boolt``)
+ If ``true``, in the class inheritance expression cl
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
LG
https://reviews.llvm.org/D30405
___
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: include/clang/Format/Format.h:354
+ /// fixes invalid existing ones.
+ bool FixNamespaceEndComments;
+
To be consistent with the clang-tidy check, just call this
"FixNamespaceComments".
After a change like this, you
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/Format.cpp:624
+// taze:, and @tag followed by { for a lot of JSDoc tags.
+GoogleStyle.CommentPragmas = "(taze:|(@[A-Za-z_0-9-]*[ \\t]*{)
djasper added inline comments.
Comment at: lib/Format/Format.cpp:627
+"(@("
+"const|"
+"define|"
I'd vote for making this "@\w*\ *{". We have seen incorrectly spelled version
and such of this in the past.
https://reviews.llvm.org/D30452
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:2229
+if (Left.is(Keywords.kw_async) && Right.is(tok::l_paren) &&
+Right.MatchingParen && Right.MatchingParen->getNextNonComment() &&
+Right.MatchingParen->getNextNonComment()->is(TT_JsFa
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
lg
https://reviews.llvm.org/D29716
___
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/D29713
___
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 inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/UnwrappedLineParser.cpp:1306
+// Could be a method inside of a braced list `{a() { return 1; }}`.
+if (tryToParseBracedList()) {
djasper added a comment.
Sorry.. Should have caught this in the initial review. Still looks good.
https://reviews.llvm.org/D29635
___
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.
Thanks
https://reviews.llvm.org/D29635
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/c
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D29634
___
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 looks very nice now :-D. Thanks for working on this!!
Comment at: lib/Format/WhitespaceManager.cpp:196
+
+ // ScopeStack keeps track of the current scope depth.
+ // We only run the "Matches" function on tokens fro
djasper added inline comments.
Comment at: lib/Format/UnwrappedLineParser.cpp:2206
+const SmallVectorImpl &Comments,
+const FormatToken* NextTok) {
bool CommentsInCurrentLine = true;
krasimir wrote:
> Any suggestions on how to improve the code quality
djasper closed this revision.
djasper added a comment.
Submitted as r294179. Sorry I missed this before.
https://reviews.llvm.org/D24703
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:190
+struct TokenTypeAndLevel {
+ TokenType Type;
I don't think you need this struct now. Just use the FormatToken itself, it
should have all of this information.
C
djasper accepted this revision.
djasper added a comment.
Just a few nits. I think this looks like a great starting point!
Comment at: clangd/ClangDMain.cpp:33
+ llvm::make_unique(Outs, Logs, Store));
+ // FIXME: textDocument/didClose
+ Dispatcher.registerHandler(
---
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Thanks and sorry if I caused this :(
https://reviews.llvm.org/D29486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Makes sense.
https://reviews.llvm.org/D29450
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/list
djasper added a comment.
I am bit unsure about the design here. Could we instead match against the
CommentPragmas and then not even create a BreakableToken (or reflow) if that
matches?
I guess that would make us unable to reflow if only part of the comment is a
pragma, but that seems ok (for n
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Nice :)
https://reviews.llvm.org/D29444
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D29396
___
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/D29383
___
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/D29329
___
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.
I don't know. I could also make an argument that more than one space at the
beginning of a line should just stop the reflow. E.g. I could see people
writing paragraphs like this:
/*
*
djasper marked an inline comment as done.
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:178
- LastBlockComment = &Change;
-} else if (Change.Kind == tok::unknown) {
- if ((Change.StartOfBlockComment = LastBlockComment))
djasper added a comment.
I apologize in advance if this causes merge conflicts with r293616. However, I
do hope that that actually makes this patch easier.
https://reviews.llvm.org/D21279
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
djasper added a comment.
I have given stuff in WhitespaceManager access to the actual FormatToken in
r293616. Hopefully that simplifies this patch.
https://reviews.llvm.org/D27651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D29323
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
djasper added a comment.
Sorry, it took a bit longer, but I have now submitted those changes in r293616.
Repository:
rL LLVM
https://reviews.llvm.org/D28462
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mai
djasper closed this revision.
djasper added a comment.
Submitted as r293616.
https://reviews.llvm.org/D29300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper updated this revision to Diff 86404.
djasper added a comment.
Added assert. Removed unused InToken.
https://reviews.llvm.org/D29300
Files:
lib/Format/BreakableToken.cpp
lib/Format/BreakableToken.h
lib/Format/ContinuationIndenter.cpp
lib/Format/ContinuationIndenter.h
lib/Format
djasper marked an inline comment as done.
djasper added inline comments.
Comment at: lib/Format/UnwrappedLineFormatter.cpp:904-907
+void UnwrappedLineFormatter::formatFirstToken(const AnnotatedLine &Line,
const AnnotatedLine
*Previo
djasper created this revision.
The main motivation behind this is to cleanup the WhitespaceManager and make it
more extensible for future alignment etc. features. Specifically,
WhitespaceManager has started to copy more and more code that is already
present in FormatToken. Instead, I think it m
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/UnwrappedLineParser.cpp:2095
+ const FormatToken *MinColumnToken = Line.Tokens.front().Tok;
+ {
+// Scan for '{//'. If found, use the colum
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: unittests/Format/FormatTestJS.cpp:1002
+TEST_F(FormatTestJS, IgnoresMpegTS) {
+ char mpegTS[200];
+ mpegTS[0] = 0x47;
nit: Should be Mpeg
djasper added a comment.
No problem :)
Repository:
rL LLVM
https://reviews.llvm.org/D29039
___
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 happy to let other people in the community weigh in, but I would not move
forward with this patch. Listing directories is not a task that clang-format
should do. It does not seem useful to me to add this functionality to basically
every single tool that you might w
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good. Thanks!
https://reviews.llvm.org/D29033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailm
301 - 400 of 423 matches
Mail list logo