[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-04-05 Thread Ben Hamilton via Phabricator via cfe-commits
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

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-04-05 Thread Ben Hamilton via Phabricator via cfe-commits
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

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-04-05 Thread Daniel Jasper via Phabricator via cfe-commits
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) && +

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-04-04 Thread Jacek Olesiak via Phabricator via 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

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-04-04 Thread Ben Hamilton via Phabricator via cfe-commits
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

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-04-02 Thread Ben Hamilton via Phabricator via cfe-commits
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) && +

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-30 Thread Ben Hamilton via Phabricator via cfe-commits
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 &&

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-30 Thread Daniel Jasper via Phabricator via cfe-commits
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 &&

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Ben Hamilton via Phabricator via cfe-commits
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("-

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Ben Hamilton via Phabricator via cfe-commits
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

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Jacek Olesiak via Phabricator via cfe-commits
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"

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Jacek Olesiak via Phabricator via cfe-commits
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"

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Jacek Olesiak via Phabricator via cfe-commits
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

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-28 Thread Ben Hamilton via Phabricator via cfe-commits
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 %