jolesiak accepted this revision.
jolesiak added a comment.
This revision is now accepted and ready to land.
Makes sense, thanks for patching this!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77039/new/
https://reviews.llvm.org/D77039
_
jolesiak added a comment.
Nice! That looks very promising.
It still fails when we pass a longer range (maybe mimicking `PreviousRBrace`
will help), e.g.:
Base code:
@protocol A
@optional
// comment
- (void)f;
@end
MACRO
formatted with `clang-format -lines=3:6 file.m` gives:
@pr
jolesiak added a comment.
Thanks!
https://reviews.llvm.org/D49580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jolesiak added a comment.
In https://reviews.llvm.org/D49580#1179924, @djasper wrote:
> Ok, so IIUC, understanding that @end effective ends a section much like "}"
> would address the currently observed problems?
I think so.
https://reviews.llvm.org/D49580
jolesiak added a comment.
First of all, thanks, Arnaud, for looking into this.
Let's address the mentioned bug first.
Let's assume that we use `IndentReference = Relative`. I think that this
particular formatting bug is local (i.e. can be solved while processing a
`@protocol` block). Look at th
jolesiak added a comment.
Sorry for the delay, I'll comment on that tomorrow.
https://reviews.llvm.org/D49580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jolesiak added a comment.
Herald added a subscriber: acoomans.
I think we should reconsider applying this change, at least for a very common
"#import ".
Repository:
rC Clang
https://reviews.llvm.org/D44634
___
cfe-commits mailing list
cfe-commit
jolesiak closed this revision.
jolesiak added a comment.
This change was submitted (for some reason (probably some rebase operations) it
was not automatically connected to the commit):
https://reviews.llvm.org/rC336521, https://reviews.llvm.org/rL336521.
Repository:
rC Clang
https://reviews.
jolesiak closed this revision.
jolesiak added a comment.
This change was submitted (for some reason (probably some rebase operations) it
was not automatically connected to the commit):
https://reviews.llvm.org/rC336520, https://reviews.llvm.org/rL336520
Repository:
rC Clang
https://reviews.l
This revision was automatically updated to reflect the committed changes.
Closed by commit rL336519: [clang-format/ObjC] Prohibit breaking after a
bracket opening ObjC methodā¦ (authored by jolesiak, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.ll
This revision was automatically updated to reflect the committed changes.
Closed by commit rL336518: [clang-format/ObjC] Fix counting selector name parts
for ObjC (authored by jolesiak, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D48716
jolesiak added a comment.
In https://reviews.llvm.org/D48716#1149733, @benhamilton wrote:
> Phabricator has an `Edit Related Revisions` feature where you can tag other
> revisions as being dependencies of or depending upon the current revision:
Thanks! That's what I was looking for.
Reposito
jolesiak marked an inline comment as done.
jolesiak added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:1411
+ // line).
+ if (Current.MatchingParen && Current.MatchingParen->Previous) {
+const FormatToken &CurrentScopeOpener = *Current.MatchingParen->Pre
jolesiak updated this revision to Diff 153706.
jolesiak added a comment.
Rebase.
Repository:
rC Clang
https://reviews.llvm.org/D48720
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
==
jolesiak updated this revision to Diff 153705.
jolesiak added a comment.
Improve condition.
Repository:
rC Clang
https://reviews.llvm.org/D48720
Files:
lib/Format/ContinuationIndenter.cpp
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp
Inde
jolesiak added a comment.
In https://reviews.llvm.org/D48718#1146805, @benhamilton wrote:
> Can you add a test, please?
The test could look like:
a = [a aa:aa
aa:aa];
with appropriate column limit.
Right now, however, this would be formatted:
a =
[a aa:aa aa:aa
jolesiak updated this revision to Diff 153689.
jolesiak added a comment.
Fix grammar mistakes.
Repository:
rC Clang
https://reviews.llvm.org/D48716
Files:
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
Index: lib/Format/TokenAnnotator.cpp
===
jolesiak marked 6 inline comments as done.
jolesiak added a comment.
In https://reviews.llvm.org/D48716#1146796, @benhamilton wrote:
> > Count selector parts also for method declarations.
>
> What bug does this fix? Can you add a test which breaks before this change
> and is fixed by this change
jolesiak marked 6 inline comments as done.
jolesiak added inline comments.
Comment at: lib/Format/FormatToken.h:247-248
+ /// If this is the first ObjC selector name in an ObjC method
+ /// definition or call, this contains the number of parts that whole selector
+ /// consist
jolesiak abandoned this revision.
jolesiak added a comment.
Split:
https://reviews.llvm.org/D48716
https://reviews.llvm.org/D48718
https://reviews.llvm.org/D48719
https://reviews.llvm.org/D48720
Repository:
rC Clang
https://reviews.llvm.org/D48352
__
jolesiak updated this revision to Diff 153313.
jolesiak added a comment.
Fix base change.
Repository:
rC Clang
https://reviews.llvm.org/D48719
Files:
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
=
jolesiak updated this revision to Diff 153312.
jolesiak added a comment.
Fix comment.
Repository:
rC Clang
https://reviews.llvm.org/D48719
Files:
lib/Format/ContinuationIndenter.cpp
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp
Index: uni
jolesiak created this revision.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
https://reviews.llvm.org/D48720
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
=
jolesiak created this revision.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
https://reviews.llvm.org/D48719
Files:
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
=
jolesiak created this revision.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
https://reviews.llvm.org/D48718
Files:
lib/Format/ContinuationIndenter.cpp
Index: lib/Format/ContinuationIndenter.cpp
===
--- lib/For
jolesiak updated this revision to Diff 153298.
jolesiak added a comment.
Fix comment
Repository:
rC Clang
https://reviews.llvm.org/D48716
Files:
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
Index: lib/Format/TokenAnnotator.cpp
=
jolesiak created this revision.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
https://reviews.llvm.org/D48716
Files:
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
Index: lib/Format/TokenAnnotator.cpp
jolesiak added a comment.
In https://reviews.llvm.org/D48352#1145220, @benhamilton wrote:
> It's really hard to understand reviews which change 4 different things.
>
> I hate to ask, but can you split this up into the 4 fixes?
Sure, I'll split it tomorrow.
Repository:
rC Clang
https://revi
This revision was automatically updated to reflect the committed changes.
Closed by commit rC335338: [clang-format] Add AlwaysBreakBeforeMultilineString
tests (authored by jolesiak, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D48432?vs=152298&id=152455#toc
Repository:
r
jolesiak created this revision.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
https://reviews.llvm.org/D48432
Files:
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
===
--- unittes
jolesiak updated this revision to Diff 152043.
jolesiak added a comment.
- Add test
Repository:
rC Clang
https://reviews.llvm.org/D48352
Files:
lib/Format/ContinuationIndenter.cpp
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp
Index: unitt
jolesiak created this revision.
Herald added a subscriber: cfe-commits.
1. Fix counting parameters/arguments for ObjC.
2. Fix split priorities for ObjC methods.
3. Fix breaking after square bracket starting ObjC method expression.
4. Fix putting ObjC method arguments into one line when they fit.
jolesiak added a comment.
Sorry, I missed that.
LGTM, I would consider adding ObjC method expression tests (multiline string as
an argument). Will look into that next week.
Repository:
rL LLVM
https://reviews.llvm.org/D47393
___
cfe-commits mail
This revision was automatically updated to reflect the committed changes.
Closed by commit rC333539: Revert "[clang-format] Fix putting ObjC message
arguments in one line forā¦ (authored by jolesiak, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47527?vs=149074&id=149101#toc
jolesiak created this revision.
Herald added subscribers: cfe-commits, klimek.
This reverts commit db9e5e9a616d7fdd4d1ba4c3b2cd89d8a0238533.
Repository:
rC Clang
https://reviews.llvm.org/D47527
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestObjC.cpp
Index: unitte
This revision was automatically updated to reflect the committed changes.
Closed by commit rC333171: [clang-format] Fix putting ObjC message arguments in
one line for multilineā¦ (authored by jolesiak, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47195?vs=148169&id=148370#t
jolesiak added a comment.
Does it look fine now @krasimir ?
Repository:
rC Clang
https://reviews.llvm.org/D47195
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jolesiak added a comment.
LGTM, would be nice though if somebody else took a look (@klimek ?).
Repository:
rC Clang
https://reviews.llvm.org/D47095
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/list
jolesiak added inline comments.
Comment at: lib/Format/UnwrappedLineParser.cpp:2137
+ do {
+if (FormatTok->Tok.isOneOf(tok::semi, tok::r_brace)) {
+ nextToken();
`tok::r_brace` could be skiped - see comment to line 2143.
Comment at: l
jolesiak added inline comments.
Comment at: unittests/Format/FormatTestObjC.cpp:815
+
+ // No line break before closing receiver's scope.
+ verifyFormat("[[obj a:42] a:42\n"
krasimir wrote:
> jolesiak wrote:
> > krasimir wrote:
> > > jolesiak wrote:
> > > > kra
jolesiak updated this revision to Diff 148169.
jolesiak added a comment.
- Add test
Repository:
rC Clang
https://reviews.llvm.org/D47195
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
===
jolesiak updated this revision to Diff 148038.
jolesiak added a comment.
Rebase.
Repository:
rC Clang
https://reviews.llvm.org/D47195
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
==
This revision was automatically updated to reflect the committed changes.
Closed by commit rC332998: Revert "[clang-format] Fix putting ObjC message
arguments in one line forā¦ (authored by jolesiak, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47205?vs=148030&id=148032#toc
jolesiak added inline comments.
Comment at: unittests/Format/FormatTestObjC.cpp:815
+
+ // No line break before closing receiver's scope.
+ verifyFormat("[[obj a:42] a:42\n"
krasimir wrote:
> jolesiak wrote:
> > krasimir wrote:
> > > What's the receiver's scope
jolesiak created this revision.
Herald added subscribers: cfe-commits, klimek.
Repository:
rC Clang
https://reviews.llvm.org/D47205
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
==
jolesiak added inline comments.
Comment at: unittests/Format/FormatTestObjC.cpp:815
+
+ // No line break before closing receiver's scope.
+ verifyFormat("[[obj a:42] a:42\n"
krasimir wrote:
> What's the receiver's scope in this comment referring to?
> Also, how
jolesiak created this revision.
Herald added subscribers: cfe-commits, klimek.
Repository:
rC Clang
https://reviews.llvm.org/D47195
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
===
jolesiak accepted this revision.
jolesiak added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/TokenAnnotator.cpp:510
+CurrentToken->Previous->Type = TT_SelectorName;
+ }
// determineStarAmpUsage() thinks t
This revision was automatically updated to reflect the committed changes.
Closed by commit rL332582: [clang-format] Fix putting ObjC message arguments in
one line for multilineā¦ (authored by jolesiak, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.
This revision was automatically updated to reflect the committed changes.
Closed by commit rC332582: [clang-format] Fix putting ObjC message arguments in
one line for multilineā¦ (authored by jolesiak, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46879?vs=146818&id=147265#t
jolesiak created this revision.
Herald added subscribers: cfe-commits, klimek.
Currently BreakBeforeParameter is set to true everytime message receiver
spans multiple lines, e.g.:
[[object block:^{
return 42;
}] aa:42 bb:42];
will be formatted:
[[object block:^{
return 42;
}] aa:42
bb:4
jolesiak added a comment.
> I am proposing to update the Google Objective-C style guide to explicitly
> describe the desired indentation behavior.
+1
Repository:
rC Clang
https://reviews.llvm.org/D45004
___
cfe-commits mailing list
cfe-commits@
jolesiak accepted this revision.
jolesiak added a comment.
This revision is now accepted and ready to land.
lgtm
Repository:
rC Clang
https://reviews.llvm.org/D44996
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cg
jolesiak added inline comments.
Comment at: unittests/Format/FormatTestObjC.cpp:527
+ // Make sure selectors with 0, 1, or more arguments are not indented
+ // when IndentWrappedFunctionNames is false.
+ verifyFormat("- (a)\n"
joles
jolesiak added inline comments.
Comment at: unittests/Format/FormatTestObjC.cpp:527
+ // Make sure selectors with 0, 1, or more arguments are not indented
+ // when IndentWrappedFunctionNames is false.
+ verifyFormat("- (a)\n"
joles
jolesiak added inline comments.
Comment at: unittests/Format/FormatTestObjC.cpp:527
+ // Make sure selectors with 0, 1, or more arguments are not indented
+ // when IndentWrappedFunctionNames is false.
+ verifyFormat("- (a)\n"
I kno
jolesiak accepted this revision.
jolesiak added a comment.
This revision is now accepted and ready to land.
Well spotted.
Repository:
rC Clang
https://reviews.llvm.org/D44994
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.ll
jolesiak 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",
krasimir wrote:
> jolesiak wrot
jolesiak accepted this revision.
jolesiak added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/Format.cpp:1450
// Keep this array sorted, since we are binary searching over it.
static constexpr llvm::StringLiteral FoundationIden
jolesiak 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",
djasper wrote:
> I have concern
jolesiak requested changes to this revision.
jolesiak added inline comments.
This revision now requires changes to proceed.
Comment at: unittests/Format/FormatTest.cpp:12099
EXPECT_EQ(FormatStyle::LK_ObjC, guessLanguage("foo", "@interface
Foo\n@end\n"));
+ EXPECT_EQ(FormatSt
jolesiak requested changes to this revision.
jolesiak added inline comments.
This revision now requires changes to proceed.
Comment at: lib/Format/TokenAnnotator.cpp:323
+ const FormatToken *parseCpp11Attribute(const FormatToken *Tok,
+
This revision was automatically updated to reflect the committed changes.
Closed by commit rC325221: [clang-format] Improve ObjC headers detection
(authored by jolesiak, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D43124?vs=134180&id=134388#toc
Repository:
rC Clang
htt
jolesiak updated this revision to Diff 134180.
jolesiak added a comment.
This revision is now accepted and ready to land.
Added support for ObjC characteristic keywords starting a new line.
Repository:
rC Clang
https://reviews.llvm.org/D43124
Files:
lib/Format/Format.cpp
unittests/Format
jolesiak abandoned this revision.
jolesiak added a comment.
In https://reviews.llvm.org/D43231#1006123, @krasimir wrote:
> I don't believe this is needed: test fails before would fail at the line
> where test instance is checked, and after they will fail at the checkLanguage
> function.
Thank
jolesiak planned changes to this revision.
jolesiak added a comment.
I'll add a few test cases after submitting https://reviews.llvm.org/D43231.
Repository:
rC Clang
https://reviews.llvm.org/D43124
___
cfe-commits mailing list
cfe-commits@lists.l
jolesiak created this revision.
Herald added subscribers: cfe-commits, klimek.
Simplifies ObjC style tests.
Repository:
rC Clang
https://reviews.llvm.org/D43231
Files:
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
==
jolesiak updated this revision to Diff 133608.
jolesiak added a comment.
Add NSBundle.
Repository:
rC Clang
https://reviews.llvm.org/D43124
Files:
lib/Format/Format.cpp
Index: lib/Format/Format.cpp
===
--- lib/Format/Format.
jolesiak created this revision.
jolesiak added a reviewer: benhamilton.
Herald added subscribers: cfe-commits, klimek.
Improve ObjC headers detection by adding additional keywords.
Repository:
rC Clang
https://reviews.llvm.org/D43124
Files:
lib/Format/Format.cpp
Index: lib/Format/Format.
This revision was automatically updated to reflect the committed changes.
Closed by commit rL324469: [clang-format] Fix ObjC message arguments
formatting. (authored by jolesiak, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D42493
Files:
This revision was automatically updated to reflect the committed changes.
Closed by commit rL324338: Test commit - fixing a comment. (authored by
jolesiak, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D42901
Files:
cfe/trunk/lib/Forma
jolesiak created this revision.
Herald added subscribers: cfe-commits, klimek.
jolesiak added reviewers: krasimir, benhamilton.
A test commit.
Repository:
rC Clang
https://reviews.llvm.org/D42901
Files:
lib/Format/ContinuationIndenter.h
Index: lib/Format/ContinuationIndenter.h
==
jolesiak added inline comments.
Comment at: lib/Format/Format.cpp:765
GoogleStyle.ColumnLimit = 100;
+GoogleStyle.BinPackObjCProtocolList = FormatStyle::BPS_Never;
}
If I understand correctly this is meant to be ObjC-specific flag. I feel like
this s
jolesiak updated this revision to Diff 131943.
jolesiak added a comment.
- Add test
Repository:
rC Clang
https://reviews.llvm.org/D42493
Files:
lib/Format/ContinuationIndenter.cpp
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp
Index: unitt
jolesiak updated this revision to Diff 131825.
jolesiak added a comment.
- Add comment explaining ParameterCount reset.
Repository:
rC Clang
https://reviews.llvm.org/D42493
Files:
lib/Format/ContinuationIndenter.cpp
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
unittests/For
jolesiak added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:419
StartsObjCMethodExpr = true;
+ Left->ParameterCount = 0;
Contexts.back().ColonIsObjCMethodExpr = true;
benhamilton wrote:
> What does this line do? Seems
jolesiak requested changes to this revision.
jolesiak added inline comments.
This revision now requires changes to proceed.
Comment at: test/Format/lit.local.cfg:2-3
+# Suffixes supported by clang-format.
+config.suffixes = ['.cpp', '.h', '.m', '.mm', '.java', '.js', '.ts', '.pro
jolesiak created this revision.
Herald added subscribers: cfe-commits, klimek.
jolesiak edited the summary of this revision.
Fixes formatting of ObjC message arguments when inline block is a first
argument.
Having inline block as a first when method has multiple parameters is
discouraged by Apple
jolesiak created this revision.
jolesiak added a reviewer: krasimir.
Herald added a subscriber: klimek.
[clang-format] Fix ParameterCount for ObjC.
Repository:
rC Clang
https://reviews.llvm.org/D41448
Files:
lib/Format/TokenAnnotator.cpp
Index: lib/Format/TokenAnnotator.cpp
=
jolesiak created this revision.
jolesiak added a reviewer: krasimir.
Herald added a subscriber: klimek.
This patch improves detection of ObjC header files.
Right now many ObjC headers, especially short ones, are categorized as C/C++.
Way of filtering still isn't the best, as most likely it should
80 matches
Mail list logo