djasper added inline comments.
Comment at: lib/Format/Format.cpp:1449
const AdditionalKeywords &Keywords) {
+for (auto Line : AnnotatedLines)
+ if (LineContainsObjCCode(*Line, Keywords))
I would not create a second function her
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Generally looks good, one minor simplification.
Comment at: lib/Format/TokenAnnotator.cpp:2484
+ if (Right.is(tok::r_brace) && Right.MatchingParen &&
+ Right.Matching
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/D44831
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.o
djasper accepted this revision.
djasper added a comment.
Yeah, it's one of these things where neither way would be totally intuitive to
everyone.
Repository:
rC Clang
https://reviews.llvm.org/D44816
___
cfe-commits mailing list
cfe-commits@lists
djasper added a comment.
Do we have a public style guide that explicitly says to do this?
That's a requirement for new style options as per
https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options.
Also, are we sure that somebody wants the other behavior? Does tha
djasper added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:899
if (!State.Stack.back().ObjCSelectorNameFound) {
+ unsigned MinIndent =
+ (Style.IndentWrappedFunctionNames
I think I'd now find this slightly easier to read as:
djasper added a comment.
Well, I disagree. It says: "If you break after the return type of a function
declaration or definition, do not indent."
Repository:
rC Clang
https://reviews.llvm.org/D45004
___
cfe-commits mailing list
cfe-commits@lists.
djasper added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:904
+ : State.Stack.back().Indent);
if (NextNonComment->LongestObjCSelectorName == 0)
+return MinIndent;
benhamilton wrote:
> djasper wrote:
> > Does this
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:1347
+} else if (Current.isOneOf(tok::identifier, tok::kw_new) &&
+ Current.Previous && Current.Previous->is(TT_CastRParen) &&
+ Current.Previous->MatchingParen &&
---
djasper accepted this revision.
djasper added a comment.
Looks good.
Repository:
rC Clang
https://reviews.llvm.org/D44994
___
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. I like option 2 :).
Repository:
rC Clang
https://reviews.llvm.org/D45169
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
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/D45168
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.o
djasper added inline comments.
Comment at: lib/Format/UnwrappedLineParser.cpp:2135
+nextToken();
+if (FormatTok->Tok.is(tok::less))
+ NumOpenAngles++;
The UnwrappedLineParser is very much about error recovery. Implemented like
this, it will consume
djasper added a comment.
I still really believe that these config options do no make sense and are
actively confusing.
I see two options:
- We leave this as is
- We fix this right
The right fix here is (IMO) that a style already is per language and thus
already has a member specifying the lan
djasper accepted this revision.
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:1347
+} else if (Current.isOneOf(tok::identifier, tok::kw_new) &&
+ Current.Previous && Current.Previous->is(TT_CastRParen) &&
+ Current.Previo
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/D45185
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://l
djasper added a comment.
I'd go to great lengths to avoid adding new config options and so I don't think
this would be a bad trade-off to make.
Also, note that you might not actually have to change much. A FormatStyle
already contains a reference to the FormatStyleSet it was created from and yo
djasper added a comment.
Please read:
https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options
In this case in particular, I would be very interested in a style guide that
defines how Allman brace style and lambdas work together. IMO, it has so many
corner ca
djasper added a comment.
Ok, you know the ObjC community much better than I do. If you think that adding
the indentation for ObjC irrespective of the option works for most people, I am
happy to go with it.
Repository:
rC Clang
https://reviews.llvm.org/D45004
_
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Some minor remarks, but generally looks good. Thanks for fixing this!
Comment at: lib/Format/UsingDeclarationsSorter.cpp:136
for (size_t I = 0, E = AnnotatedLines.size()
djasper added a comment.
Looks good, thank you.
https://reviews.llvm.org/D39587
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper added a comment.
Submitted as r317473. Thank you!
https://reviews.llvm.org/D39587
___
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. Do you have submit access?
https://reviews.llvm.org/D39478
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper added a comment.
Out of curiosity, will this be able to fix the two situations that you get for
python extension?
There, you usually have a PyObject_HEAD with out semicolon in a struct and than
a PyObject_HEAD_INIT(..) in a braced init list. More info:
http://starship.python.net/crew/mwh
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/FormatTokenLexer.cpp:344
+ size_t To = Lex->getBuffer().find_first_of('\n', From);
+ if (To == StringRef::npos) To = Lex->getBuffer().size();
+
djasper closed this revision.
djasper added a comment.
Submitted as r317901.
https://reviews.llvm.org/D39478
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper added a comment.
Is this different for C++ lambdas? I would think that we never should add an
empty line before the "}" of a child block.
https://reviews.llvm.org/D40178
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.l
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good. There is a chance that some people do not want this in their coding
style. But if so, we can add an option later.
https://reviews.llvm.org/D40178
djasper added a comment.
I agree that fallback-style should only be used when there is no .clang-format
file. If we find one, and it doesn't parse correctly, we should neither use the
fallback style nor scan in higher-level directories (not sure whether we
currently do that).
https://reviews.
djasper added a comment.
Yes.. return non-zero seems right. This is an error condition.
https://reviews.llvm.org/D27440
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper created this revision.
djasper added a reviewer: rsmith.
djasper added a subscriber: cfe-commits.
Herald added a subscriber: sanjoy.
In many translation units I have tested, many of the calls to
DiagnosticsEngine::GetDiagStatePointForLoc are for source locations before the
first diag sta
djasper created this revision.
djasper added a reviewer: rsmith.
djasper added a subscriber: cfe-commits.
In many translation units I have tried, the calls to isIgnored() removed in
this patch are more expensive than doing the analysis that is behind it. The
speed-up in translation units I have
djasper created this revision.
djasper added a reviewer: rsmith.
djasper added a subscriber: cfe-commits.
Specifically:
- Separate one-entry cache for loaded and local files
- Use bound that can be deduced from that cache for LessIndex
- Address FIXME to use a faster alternative to isOffsetInFile
djasper added inline comments.
Comment at: lib/Basic/Diagnostic.cpp:179
+
+ // 2nd most frequent case: L is before the first diag state change.
+ FullSourceLoc FirstStateChangePos = DiagStatePoints[1].Loc;
rsmith wrote:
> It's surprising to me that this would b
djasper added inline comments.
Comment at: lib/Basic/Diagnostic.cpp:179
+
+ // 2nd most frequent case: L is before the first diag state change.
+ FullSourceLoc FirstStateChangePos = DiagStatePoints[1].Loc;
rsmith wrote:
> djasper wrote:
> > rsmith wrote:
> > >
djasper closed this revision.
djasper added a comment.
Landed as r290842.
https://reviews.llvm.org/D28208
___
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.
Just some nits. Thanks for working on this!
Comment at: lib/Format/WhitespaceManager.cpp:158
+static bool IsPointerOrReference(tok::TokenKind Kind) {
+ return Kind == tok::star || Kind == tok::amp || Kind == tok::ampam
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.. Very nice :)
Comment at: lib/Tooling/Refactoring/AtomicChange.cpp:102
+ Code.substr(StartPos, EndPos - StartPos).split(Lines, '\n');
+ for (llvm::StringRef L
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:287
SmallVector
&Changes,
+bool ConsiderScope, bool ConsiderCommas,
unsigned StartAt) {
I don't find
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 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 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 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 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. 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 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 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 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: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 a comment.
Ping?
https://reviews.llvm.org/D28218
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper added inline comments.
Comment at: Format/FormatToken.h:148
+ /// \brief Whether the token is the final token in the identifier of a PP
+ // macro. This will be either 1) the identifier token following the 'define'
This adds a lot of code, runtime and
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/Format.cpp:1906
- // FIXME: If FallbackStyle is explicitly "none", format is disabled.
- if (!getPredefinedStyle(FallbackStyle, Style.Languag
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:207
+
+if (i != Start) {
+ if (Changes[i].NestingAndIndentLevel >
Merge the two ifs into a single one?
Comment at: lib/Format/WhitespaceManager.cpp:318
+ for
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
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 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 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 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 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 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 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 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 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 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.
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 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 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 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 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.
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/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.
Nice :)
https://reviews.llvm.org/D29444
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/
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.
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 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.
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 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 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/UnwrappedLineParser.cpp:2206
+const SmallVectorImpl &Comments,
+const FormatToken* NextTok) {
bool CommentsInCurrentLine = true;
krasimir wrote:
> Any suggestions on how to improve the code quality
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 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 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 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 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 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 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.
Looks good. Thank you!
https://reviews.llvm.org/D34623
___
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/D34621
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
djasper added a comment.
Just make clang-format always do this. I don't think anyone is relying on the
current behavior.
https://reviews.llvm.org/D33932
___
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. Thank you.
https://reviews.llvm.org/D33932
___
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/D34749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
djasper added a comment.
Can you add a test? Tests for this kind of behavior of the clang-format command
line go in test/Format/.
Comment at: tools/clang-format/ClangFormat.cpp:380
+if (Verbose.getNumOccurrences() != 0)
+outs() << "Formatting " << FileNames[0] << '
djasper added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:71
+ const FormatStyle &Style) {
+ assert(LessTok.is(tok::less));
+ return Style.Language == FormatStyle::LK_TextProto ||
Maybe rename to opensP
djasper added inline comments.
Comment at: lib/Format/UnwrappedLineFormatter.cpp:723
FormatDecision LastFormat = Node->State.NextToken->Decision;
if (LastFormat == FD_Unformatted || LastFormat == FD_Continue)
+addNextStateToQueue(Penalty, Node, /*NewLine=*/f
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D35015
___
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/Format.cpp:1958
LangOpts.DeclSpecKeyword = 1; // To get __declspec.
+ LangOpts.CoroutinesTS = 1;
return LangOpts;
Can we change this only if Style.isCpp()? We should probably do that for other
things,
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:2267
+ return true;
+if (Right.is(tok::l_paren) && Left.is(tok::kw_co_await) &&
+Left.Previous && Left.Previous->is(tok::kw_operator))
EricWF wrote:
> djasper wrote:
> > I k
djasper added a comment.
Generally upload diffs with full context to phabricator. That makes reviewing
much easier.
Comment at: test/Format/verbose.cpp:2
+// RUN: clang-format %s -verbose | FileCheck %s
+// CHECK: Formatting
+
This seems like a pretty minimal
djasper added a comment.
I still think we should make this dependent on the current indentation. Why do
you think this is better?
https://reviews.llvm.org/D35296
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/
201 - 300 of 423 matches
Mail list logo