[PATCH] D151578: [Format/ObjC] Support NS_ASSUME_NONNULL_BEGIN and FOUNDATION_EXPORT in ObjC language guesser

2023-05-30 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG85670ac86813: [Format/ObjC] Support NS_ASSUME_NONNULL_BEGIN and FOUNDATION_EXPORT in ObjC… (authored by benhamilton). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D151578: [Format/ObjC] Support NS_ASSUME_NONNULL_BEGIN and FOUNDATION_EXPORT in ObjC language guesser

2023-05-26 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 526154. benhamilton added a comment. Add `FOUNDATION_EXTERN` alias for `FOUNDATION_EXPORT` (Apple `#define`s the former to the latter). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151578/new/

[PATCH] D151578: [Format/ObjC] Support NS_ASSUME_NONNULL_BEGIN and FOUNDATION_EXPORT in ObjC language guesser

2023-05-26 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 526151. benhamilton added a comment. Fix auto-complete-o. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151578/new/ https://reviews.llvm.org/D151578 Files: clang/lib/Format/Format.cpp

[PATCH] D151578: [Format/ObjC] Support NS_ASSUME_NONNULL_BEGIN and FOUNDATION_EXPORT in ObjC language guesser

2023-05-26 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added a reviewer: MyDeveloperDay. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan. benhamilton requested review of this revision. This adds to the

[PATCH] D147577: [Format/ObjC] Support NS_ERROR_ENUM in ObjC language guesser

2023-04-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a subscriber: goncharov. benhamilton added a comment. In D147577#4252225 , @MyDeveloperDay wrote: > The build machines aren’t using a latest enough version of clang-format for > our local .clang-format file Thanks, that's what I

[PATCH] D147577: [Format/ObjC] Support NS_ERROR_ENUM in ObjC language guesser

2023-04-07 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG00ea6798959d: [Format/ObjC] Support NS_ERROR_ENUM in ObjC language guesser (authored by benhamilton). Repository: rG LLVM Github Monorepo

[PATCH] D147577: [Format/ObjC] Support NS_ERROR_ENUM in ObjC language guesser

2023-04-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Filed https://github.com/llvm/llvm-project/issues/62007 on the buildkite failure (despite it being in `git-clang-format`, I'm about 98% sure it's unrelated). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147577/new/

[PATCH] D147577: [Format/ObjC] Support NS_ERROR_ENUM in ObjC language guesser

2023-04-06 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 511539. benhamilton added a comment. Rebasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147577/new/ https://reviews.llvm.org/D147577 Files: clang/lib/Format/Format.cpp

[PATCH] D147577: [Format/ObjC] Support NS_ERROR_ENUM in ObjC language guesser

2023-04-04 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: sammccall, MyDeveloperDay. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan. benhamilton requested review of this revision. Apple

[PATCH] D118921: [Format] Don't derive pointers right based on space before method ref-qualifiers

2022-02-03 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Got it, thanks. Comment at: clang/lib/Format/Format.cpp:1949 continue; +// Don't treat space in `void foo() &&` as evidence. +if (const

[PATCH] D118921: [Format] Don't derive pointers right based on space before method ref-qualifiers

2022-02-03 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton requested changes to this revision. benhamilton added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/Format.cpp:1949 continue; +// Don't treat space in `void foo() &&` as evidence. +if (const

[PATCH] D111975: [clang-format] [PR52015] clang-format should put __attribute__((foo)) on its own line before @interface / @implementation / @protocol

2021-10-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111975/new/ https://reviews.llvm.org/D111975 ___ cfe-commits mailing list

[PATCH] D99063: [clang-format] Fix ObjC method indent after f7f9f94b

2021-03-24 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99063/new/ https://reviews.llvm.org/D99063

[PATCH] D89496: [Format/ObjC] Correctly handle base class with lightweight generics and protocol

2020-10-16 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG24b5266892c3: [Format/ObjC] Correctly handle base class with lightweight generics and protocol (authored by benhamilton). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D89496: [Format/ObjC] Correctly handle base class with lightweight generics and protocol

2020-10-15 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: sammccall, MyDeveloperDay. Herald added a project: clang. Herald added a subscriber: cfe-commits. benhamilton requested review of this revision. ClangFormat does not correctly handle an Objective-C interface declaration with both

[PATCH] D89425: [Format/ObjC] Add NS_SWIFT_NAME() and CF_SWIFT_NAME() to WhitespaceSensitiveMacros

2020-10-14 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe7b4feea8e1b: [Format/ObjC] Add NS_SWIFT_NAME() and CF_SWIFT_NAME() to… (authored by benhamilton). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89425/new/

[PATCH] D89425: [Format/ObjC] Add NS_SWIFT_NAME() and CF_SWIFT_NAME() to WhitespaceSensitiveMacros

2020-10-14 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: sammccall, JakeMerdichAMD, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. benhamilton requested review of this revision. The argument passed to the preprocessor macros `NS_SWIFT_NAME(x)` and

[PATCH] D77571: Add ClangTidy check to find calls to NSInvocation methods under ARC that don't have proper object argument lifetimes.

2020-04-06 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/objc/NsinvocationArgumentLifetimeCheck.cpp:71-73 + // Currently there is no way to directly get the source range for

[PATCH] D72876: Create a clang-tidy check to warn when -dealloc is implemented inside an ObjC class category.

2020-02-10 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0151ddc2e834: Create a clang-tidy check to warn when -dealloc is implemented inside an ObjC… (authored by mwyman, committed by benhamilton). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D72876: Create a clang-tidy check to warn when -dealloc is implemented inside an ObjC class category.

2020-02-06 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. LGTM, just one nit-pick. Comment at: clang-tools-extra/clang-tidy/objc/DeallocInCategoryCheck.h:24 +/// http://clang.llvm.org/extra/clang-tidy/checks/objc-dealloc-in-category.html +class DeallocInCategoryCheck :

[PATCH] D67567: New ClangTidy check to warn when storing dispatch_once_t in non-static, non-global storage

2019-09-13 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. It definitely shouldn't be in an `osx` directory since it's available on iOS and other Darwin-like operating systems. Probably `darwin` would be OK. Adding a new subdirectory isn't trivial, there's a lot of places to update last I looked. Should we tackle moving

[PATCH] D65012: Adds support for formatting NS_CLOSED_ENUM and CF_CLOSED_ENUM alongside NS_ENUM and CF_ENUM.

2019-07-22 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366719: Adds support for formatting NS_CLOSED_ENUM and CF_CLOSED_ENUM alongside NS_ENUM… (authored by benhamilton, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D65012: Adds support for formatting NS_CLOSED_ENUM and CF_CLOSED_ENUM alongside NS_ENUM and CF_ENUM.

2019-07-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Oh, I forgot there's one more place you should touch — the Objective-C style guesser for headers will need to be updated to understand that `NS_CLOSED_ENUM` indicates Objective-C:

[PATCH] D65012: Adds support for formatting NS_CLOSED_ENUM and CF_CLOSED_ENUM alongside NS_ENUM and CF_ENUM.

2019-07-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65012/new/ https://reviews.llvm.org/D65012

[PATCH] D65012: Adds support for formatting NS_CLOSED_ENUM alongside NS_ENUM.

2019-07-19 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton requested changes to this revision. benhamilton added a comment. This revision now requires changes to proceed. Thanks! Don't forget the CF version. Comment at: clang/lib/Format/FormatToken.h:793 IdentifierInfo *kw_CF_OPTIONS; + IdentifierInfo

[PATCH] D64775: [Format/ObjC] Avoid breaking between unary operators and operands

2019-07-19 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366592: [Format/ObjC] Avoid breaking between unary operators and operands (authored by benhamilton, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D64775: [Format/ObjC] Avoid breaking between unary operators and ObjC method invocations

2019-07-17 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked an inline comment as done. benhamilton added a comment. Any more thoughts on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64775/new/ https://reviews.llvm.org/D64775 ___

[PATCH] D64632: [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

2019-07-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Submitted as r366267. Thanks! Comment at: clang/lib/Format/TokenAnnotator.cpp:389 bool isCpp11AttributeSpecifier(const FormatToken ) { if (!Style.isCpp() || !Tok.startsSequence(tok::l_square, tok::l_square)) return false;

[PATCH] D64632: [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

2019-07-16 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366267: [clang-format] Dont detect call to ObjC class method as C++11 attribute… (authored by benhamilton, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D64775: [Format/ObjC] Avoid breaking between unary operators and ObjC method invocations

2019-07-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked an inline comment as done. benhamilton added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2427-2428 return 50; + if (Left.is(TT_UnaryOperator) && Right.is(TT_ObjCMethodExpr)) +return 60; sammccall wrote: > This

[PATCH] D64775: [Format/ObjC] Avoid breaking between unary operators and ObjC method invocations

2019-07-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 210095. benhamilton marked an inline comment as done. benhamilton added a comment. - Rebase. - Change to just avoid breaking when the left-hand side is a unary operator Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D64775: [Format/ObjC] Avoid breaking between unary operators and ObjC method invocations

2019-07-15 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: krasimir, djasper, sammccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. Test Plan: New tests added. Ran tests with: % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests Confirmed tests

[PATCH] D64632: [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

2019-07-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:7030-7032 + // Make sure that we do not mistake a call to the Objective-C method named + // "class" inside an array literal as attributes. + verifyFormat("@[ [NSArray class] ];");

[PATCH] D64632: [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

2019-07-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64632/new/ https://reviews.llvm.org/D64632

[PATCH] D64632: [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

2019-07-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:400-413 while (AttrTok && !AttrTok->startsSequence(tok::r_square, tok::r_square)) { // ObjC message send. We assume nobody will use : in a C++11 attribute // specifier

[PATCH] D64632: [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

2019-07-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Thanks for the fix. One question: how does the real Clang parser deal with this case? Is it something that's actually ambiguous in the ObjC++ grammar, I wonder? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64632/new/

[PATCH] D62045: Modified global variable declaration to fit updated objc guide.

2019-05-17 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton requested changes to this revision. benhamilton added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-tidy/google/GlobalVariableDeclarationCheck.cpp:51-52 + + auto NewName = "g" + llvm::StringRef(std::string(1,

[PATCH] D60920: [ASTMatchers] Introduce Objective-C matchers `isClassMessage`, `isClassMethod`, and `isInstanceMethod`

2019-04-22 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358904: [ASTMatchers] Introduce Objective-C matchers `isClassMessage`, `isClassMethod`… (authored by benhamilton, committed by ). Changed prior to commit:

[PATCH] D60920: [ASTMatchers] Introduce Objective-C matchers `isClassMessage`, `isClassMethod`, and `isInstanceMethod`

2019-04-19 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60920/new/ https://reviews.llvm.org/D60920 ___

[PATCH] D57923: [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrow

2019-02-08 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC353531: [Format/ObjC] Fix [foo bar]-baz formatting as lambda arrow (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D57923?vs=185859=185975#toc Repository:

[PATCH] D57923: [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrow

2019-02-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 185859. benhamilton added a comment. Tidy up code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57923/new/ https://reviews.llvm.org/D57923 Files: clang/lib/Format/TokenAnnotator.cpp

[PATCH] D57923: [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrow

2019-02-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: krasimir, djasper. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently, `UnwrappedLineParser` thinks an arrow token after an ObjC method expression is a C++ lambda arrow, so it formats: [foo bar]->baz

[PATCH] D57623: [please ignore, v2] Clang test revision for new Herald rules for Github monorepo

2019-02-01 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is another test for the new Herald rules to subscribe cfe-commits to revisions sent out from the Github monorepo under the "clang/" subdirectory. Repository: rG LLVM Github Monorepo

[PATCH] D57513: [please ignore] Clang test revision for new Herald rules for Github monorepo

2019-01-31 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 184499. benhamilton added a comment. Herald added a subscriber: cfe-commits. Herald added a project: clang. - Another update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57513/new/

[PATCH] D56909: [clang-format] Fix line parsing for noexcept lambdas

2019-01-30 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352622: [clang-format] Fix line parsing for noexcept lambdas (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D56909?vs=182514=184281#toc Repository: rL

[PATCH] D56909: [clang-format] Fix line parsing for noexcept lambdas

2019-01-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Herald added a subscriber: llvm-commits. So sorry for the delay. I've landed this diff as rC352622 . Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56909/new/ https://reviews.llvm.org/D56909

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:501 +CurrentToken->Next->is(tok::equal))) || + (CurrentToken->Previous->Previous == Left)) && Left->is(TT_ObjCMethodExpr)) { I

[PATCH] D55545: Allow IncludeSorter to use #import for Objective-C files

2018-12-13 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/utils/IncludeSorter.cpp:116 bool IsAngled) { + std::string IncludeDirective = LangOpts->ObjC ? "#import " : "#include "; std::string IncludeStmt =

[PATCH] D55482: [clang-tidy] Improve google-objc-function-naming diagnostics 

2018-12-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/google/FunctionNamingCheck.cpp:115 diag(MatchedDecl->getLocation(), - "function name %0 not using function naming conventions described by " - "Google Objective-C style guide") - << MatchedDecl <<

[PATCH] D55482: [clang-tidy] Improve google-objc-function-naming diagnostics 

2018-12-10 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Thanks, just minor suggestions. Comment at: clang-tidy/google/FunctionNamingCheck.cpp:114-118 diag(MatchedDecl->getLocation(), - "function name %0 not

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 

2018-11-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > Would you be okay with landing this fix and if we get any further reports for > Objective-C++ sources then we can suppress it in all C++/Objective-C++ > sources? I think there is enough value to enforcing the naming conventions on > non-namespaced C functions in

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 

2018-11-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. IMHO we should just disable this check entirely for C++ files (including Objective-C++). Since Objective-C++ files will have a mix of the Google Objective-C and Google C++ styles, I think there will be too many places where we'll hit conflicts like this (there are

[PATCH] D51575: [clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions 

2018-11-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: docs/clang-tidy/checks/google-objc-function-naming.rst:20 + static bool is_positive(int i) { return i > 0; } + bool IsNegative(int i) { return i < 0; } + This is not actually handled by the check, right? (You even

[PATCH] D54111: [clang-format] Do not threat the asm clobber [ as ObjCExpr

2018-11-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. In the diff description, please fix the typo: `Do not threat the asm clobber` -> `Do not treat the asm clobber` Comment at:

[PATCH] D54110: [Format] Add debugging to ObjC language guesser

2018-11-05 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346144: [Format] Add debugging to ObjC language guesser (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D54110?vs=172599=172600#toc Repository: rC Clang

[PATCH] D54110: [Format] Add debugging to ObjC language guesser

2018-11-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added a reviewer: krasimir. Herald added a subscriber: cfe-commits. To handle diagnosing bugs where ObjCHeaderStyleGuesser guesses wrong, this diff adds a bit more debug logging to the Objective-C language guesser. Repository: rC Clang

[PATCH] D53197: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > @benhamilton Could you land this patch? Done. Thanks for your contribution! Repository: rC Clang https://reviews.llvm.org/D53197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53197: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC344406: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods (authored by benhamilton, committed by ). Repository: rC Clang https://reviews.llvm.org/D53197 Files:

[PATCH] D53197: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Thanks! Repository: rC Clang https://reviews.llvm.org/D53197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51832: [clang-tidy/checks] Update objc-property-declaration check to allow arbitrary acronyms and initialisms 

2018-09-10 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. This is fine, but please update the comments (and docs?) to make it clear that we no longer enforce camelCase but allow aRBiTraRYcAsE now. Comment at:

[PATCH] D51819: [clang-tidy/ObjC] Update list of acronyms in PropertyDeclarationCheck

2018-09-07 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341720: [clang-tidy/ObjC] Update list of acronyms in PropertyDeclarationCheck (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D51819: [clang-tidy/ObjC] Update list of acronyms in PropertyDeclarationCheck

2018-09-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 164523. benhamilton added a comment. - Update docs. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51819 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp docs/clang-tidy/checks/objc-property-declaration.rst Index:

[PATCH] D51819: [clang-tidy/ObjC] Update list of acronyms in PropertyDeclarationCheck

2018-09-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: Wizard, hokein. Herald added a subscriber: cfe-commits. This adds a few common acronyms we found were missing from PropertyDeclarationCheck. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51819 Files:

[PATCH] D51575: [clang-tidy] Implement a clang-tidy check to verify Google Objective-C function naming conventions 

2018-09-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/google/FunctionNamingCheck.cpp:35 + // non-standard capitalized character sequences including acronyms, + // initialisms, and prefixes of symbols (e.g., UIColorFromNSString). For this + // reason, the regex only

[PATCH] D51575: [clang-tidy] Implement a clang-tidy check to verify Google Objective-C function naming conventions 

2018-09-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton requested changes to this revision. benhamilton added a comment. This revision now requires changes to proceed. Thanks for this! Let's consolidate this with the property name checker (either simplify the logic there and allow `arBiTRAryCapSAnYWHere` or apply the same registered

[PATCH] D49190: [clang-tidy/ObjC] Add SQL to list of acronyms

2018-07-12 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE336919: [clang-tidy/ObjC] Add SQL to list of acronyms (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D49190?vs=155004=155216#toc Repository: rCTE Clang

[PATCH] D49190: [clang-tidy/ObjC] Add SQL to list of acronyms

2018-07-11 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: Wizard, hokein. Herald added a subscriber: cfe-commits. SQL is a common acronym. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49190 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp Index:

[PATCH] D48718: [clang-format] Prohibit breaking after a bracket opening ObjC method expression

2018-07-02 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. > Sorry for the confusion. If you prefer me to add this test and modify in > later commit I'll do it. I see. Just mentioning what you did in the diff description is probably OK.

[PATCH] D48716: [clang-format] Fix counting parameters/arguments for ObjC

2018-07-02 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D48716#1149293, @jolesiak wrote: > General comment to changes https://reviews.llvm.org/D48716, > https://reviews.llvm.org/D48718,

[PATCH] D48720: [clang-format] Put ObjC method arguments into one line when they fit

2018-06-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added inline comments. This revision is now accepted and ready to land. Comment at: lib/Format/ContinuationIndenter.cpp:1411 + // line). + if (Current.MatchingParen && Current.MatchingParen->Previous) { +const FormatToken =

[PATCH] D48719: [clang-format] Fix split priorities for ObjC methods

2018-06-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Nice improvement! Repository: rC Clang https://reviews.llvm.org/D48719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D48679: [clang-format/ObjC] Fix NS_SWIFT_NAME(foo(bar:baz:)) after ObjC method decl

2018-06-29 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335983: [clang-format/ObjC] Fix NS_SWIFT_NAME(foo(bar:baz:)) after ObjC method decl (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D48716: [clang-format] Fix counting parameters/arguments for ObjC

2018-06-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton requested changes to this revision. benhamilton added a comment. This revision now requires changes to proceed. > 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?

[PATCH] D48718: [clang-format] Prohibit breaking after a bracket opening ObjC method expression

2018-06-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton requested changes to this revision. benhamilton added a comment. This revision now requires changes to proceed. Can you add a test, please? Repository: rC Clang https://reviews.llvm.org/D48718 ___ cfe-commits mailing list

[PATCH] D48679: [clang-format/ObjC] Fix NS_SWIFT_NAME(foo(bar:baz:)) after ObjC method decl

2018-06-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, krasimir. Herald added a subscriber: cfe-commits. In https://reviews.llvm.org/D44638, I partially fixed `NS_SWIFT_NAME(foo(bar:baz:))`-style annotations on C functions, but didn't add a test for Objective-C method

[PATCH] D48652: [clang-tidy/ObjC] Add hashing algorithm acronyms to objc-property-declaration

2018-06-27 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335770: [clang-tidy/ObjC] Add hashing algorithm acronyms to objc-property-declaration (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D48352: [clang-format] Improve ObjC method expressions formatting

2018-06-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton requested changes to this revision. benhamilton added a comment. This revision now requires changes to proceed. 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? Repository: rC Clang

[PATCH] D48652: [clang-tidy/ObjC] Add hashing algorithm acronyms to objc-property-declaration

2018-06-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added a reviewer: Wizard. Herald added a subscriber: cfe-commits. This PR adds a few acronyms related to hashing algorithms to the standard list in `objc-property-declaration`. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48652

[PATCH] D47393: [clang-format] Disable AlwaysBreakBeforeMultilineStrings in Google style for Objective-C 

2018-06-14 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL334739: [clang-format] Disable AlwaysBreakBeforeMultilineStrings in Google style for… (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D47393: [clang-format] Disable AlwaysBreakBeforeMultilineStrings in Google style for Objective-C 

2018-06-14 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. I'll just land it for you. Repository: rC Clang https://reviews.llvm.org/D47393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46922: [checks/property-decls] Fix comment in clang-tidy/objc/PropertyDeclarationCheck.cpp ✍️

2018-06-07 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL334238: [checks/property-decls] Fix comment in clang-tidy/objc/PropertyDeclarationCheck. (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D46922: [checks/property-decls] Fix comment in clang-tidy/objc/PropertyDeclarationCheck.cpp ✍️

2018-06-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > Is it possible to get someone to land this for me? I don't believe I have > access to land it myself. Done. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46922 ___ cfe-commits mailing list

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-30 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333553: [clang-format/ObjC] Correctly parse Objective-C methods with class in name (authored by benhamilton, committed by ). Changed prior to commit:

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 148231. benhamilton marked 2 inline comments as done. benhamilton added a comment. @jolesiak Repository: rC Clang https://reviews.llvm.org/D47095 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:2137 + do { +if (FormatTok->Tok.isOneOf(tok::semi, tok::r_brace)) { + nextToken(); jolesiak wrote: > `tok::r_brace` could be skiped - see comment to line 2143. Done.

[PATCH] D40221: [clang-format] Parse blocks in braced lists

2018-05-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton edited reviewers, added: klimek; removed: djasper. benhamilton added a comment. @djasper isn't available to review. At a high level, this seems good, but I'd like @klimek to take a look. Comment at: lib/Format/UnwrappedLineParser.cpp:1320 +// \endcode +bool

[PATCH] D47195: [clang-format] Fix ObjC message arguments handling

2018-05-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Can you update the diff description to reflect that it includes the original change? Repository: rC Clang https://reviews.llvm.org/D47195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47195: [clang-format] Fix ObjC message arguments handling

2018-05-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Please address @krasimir's comments, but looks good to me. Repository: rC Clang https://reviews.llvm.org/D47195 ___ cfe-commits

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 147611. benhamilton added a comment. Format Repository: rC Clang https://reviews.llvm.org/D47095 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestObjC.cpp Index:

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak. Herald added subscribers: cfe-commits, klimek. Please take a close look at this CL. I haven't touched much of `UnwrappedLineParser` before, so I may have gotten things wrong. Previously, clang-format would

[PATCH] D47028: [clang-format/ObjC] Correctly annotate single-component ObjC method invocations

2018-05-18 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332727: [clang-format/ObjC] Correctly annotate single-component ObjC method invocations (authored by benhamilton, committed by ). Changed prior to commit:

[PATCH] D47028: [clang-format/ObjC] Correctly annotate single-component ObjC method invocations

2018-05-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:510 +CurrentToken->Previous->Type = TT_SelectorName; + } // determineStarAmpUsage() thinks that '*' '[' is allocating an jolesiak wrote: > I'd remove

[PATCH] D47028: [clang-format/ObjC] Correctly annotate single-component ObjC method invocations

2018-05-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 147516. benhamilton marked an inline comment as done. benhamilton added a comment. Style Repository: rC Clang https://reviews.llvm.org/D47028 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestObjC.cpp Index:

[PATCH] D47028: [clang-format/ObjC] Correctly annotate single-component ObjC method invocations

2018-05-17 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's parser would fail to annotate the selector in a single-component Objective-C method invocation with `TT_SelectorName`. For example, the

[PATCH] D46659: [clang-tidy/google-readability-casting] Disable check for Objective-C++

2018-05-16 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332516: [clang-tidy/google-readability-casting] Disable check for Objective-C++ (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D46659: [clang-tidy/google-readability-casting] Disable check for Objective-C++

2018-05-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/google/AvoidCStyleCastsCheck.cpp:103-104 // The rest of this check is only relevant to C++. - if (!getLangOpts().CPlusPlus) + // We also disable it for Objective-C++. + if (!getLangOpts().CPlusPlus ||

[PATCH] D46659: [clang-tidy/google-readability-casting] Disable check for Objective-C++

2018-05-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. After discussion, I changed this diff to simply disable the check altogether for Objective-C++. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46659 ___ cfe-commits mailing list

[PATCH] D46659: [clang-tidy/google-readability-casting] Allow C-style casts to/from Objective-C object types

2018-05-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 147102. benhamilton added a comment. - Change to simply disable check for Objective-C++ Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46659 Files: clang-tidy/google/AvoidCStyleCastsCheck.cpp

[PATCH] D46659: [clang-tidy/google-readability-casting] Allow C-style casts to/from Objective-C object types

2018-05-09 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. An alternative implementation would be to allow C-style casts (either always or only for ObjC objects) within Objective-C methods inside Objective-C++ files, but that may get messy with things like shared macros. Repository: rCTE Clang Tools Extra

[PATCH] D46659: [clang-tidy/google-readability-casting] Allow C-style casts to/from Objective-C object types

2018-05-09 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: alexfh, Wizard, hokein. Herald added a subscriber: cfe-commits. Previously, `google-readability-casting` would trigger for Objective-C++ code using C-style casts to or from Objective-C object types. The official Google Objective-C

  1   2   3   4   >