This revision was automatically updated to reflect the committed changes.
Closed by commit rC329297: [clang-format] Ensure ObjC selectors with 0 args are
annotated correctly (authored by benhamilton, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D44996?vs=141161=141162#toc
benhamilton updated this revision to Diff 141161.
benhamilton added a comment.
Add FIXME comments.
Repository:
rC Clang
https://reviews.llvm.org/D44996
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
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) &&
+
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
benhamilton marked an inline comment as done.
benhamilton added a comment.
Any more comments on this one, folks? I'd love to land this fix.
Repository:
rC Clang
https://reviews.llvm.org/D44996
___
cfe-commits mailing list
benhamilton marked 2 inline comments as done.
benhamilton 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) &&
+
benhamilton 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 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 &&
benhamilton marked 3 inline comments as done.
benhamilton 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("-
benhamilton updated this revision to Diff 140259.
benhamilton added a comment.
@jolesiak
Repository:
rC Clang
https://reviews.llvm.org/D44996
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
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"
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"
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
benhamilton created this revision.
benhamilton added reviewers: djasper, jolesiak.
Herald added subscribers: cfe-commits, klimek.
Previously, clang-format would incorrectly annotate 0-argument
Objective-C selector names as TT_TrailingAnnotation:
% echo "-(void)foo;" > /tmp/test.m
%
14 matches
Mail list logo