[PATCH] D42493: [clang-format] Fix ObjC message arguments formatting.

2018-01-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:419 StartsObjCMethodExpr = true; + Left->ParameterCount = 0; Contexts.back().ColonIsObjCMethodExpr = true; jolesiak wrote: > benhamilton wrote: > > What do

[PATCH] D42493: [clang-format] Fix ObjC message arguments formatting.

2018-01-26 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/TokenAnnotator.cpp:419 StartsObjCMethodExpr = true; + Left->ParameterCount = 0; Contexts.back().ColonIsObj

[PATCH] D42395: [clang-format] Fix bug where -dump-config failed on ObjC header

2018-01-26 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton requested review of this revision. benhamilton marked 2 inline comments as done. benhamilton added inline comments. Comment at: test/Format/lit.local.cfg:1 +# Suffixes supported by clang-format. +config.suffixes = ['.c', '.cc', '.cpp', '.h', '.m', '.mm', '.java', '.js

[PATCH] D42395: [clang-format] Fix bug where -dump-config failed on ObjC header

2018-01-25 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked an inline comment as done. benhamilton added inline comments. Comment at: test/Format/lit.local.cfg:2-3 +# Suffixes supported by clang-format. +config.suffixes = ['.cpp', '.h', '.m', '.mm', '.java', '.js', '.ts', '.proto', + '.protodevel', '.p

[PATCH] D42395: [clang-format] Fix bug where -dump-config failed on ObjC header

2018-01-25 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 131470. benhamilton added a comment. - Add more extensions. Repository: rC Clang https://reviews.llvm.org/D42395 Files: test/Format/dump-config-cxx.h test/Format/dump-config-objc.h test/Format/lit.local.cfg tools/clang-format/ClangFormat.cpp

[PATCH] D42464: add prefix with '_' support for property name. Corresponding apple dev doc: https://developer.apple.com/library/content/qa/qa1908/_index.html

2018-01-24 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:52 /// FIXME: provide fix for snake_case to snakeCase -FixItHint generateFixItHint(const ObjCPropertyDecl *Decl) { - if (isupper(Decl->getName()[0])) { -auto NewName = Decl->getName(

[PATCH] D42395: [clang-format] Fix bug where -dump-config failed on ObjC header

2018-01-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 130970. benhamilton added a comment. - Support AssumeFileName with stdin. Repository: rC Clang https://reviews.llvm.org/D42395 Files: test/Format/dump-config-cxx.h test/Format/dump-config-objc.h test/Format/lit.local.cfg tools/clang-format/Cl

[PATCH] D42395: [clang-format] Fix bug where -dump-config failed on ObjC header

2018-01-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: jolesiak, krasimir. Herald added a subscriber: cfe-commits. `clang-format -dump-config path/to/file.h` never passed anything for the Code parameter to clang::format::getStyle(). This meant the logic to guess Objective-C from the cont

[PATCH] D42261: [clang-tidy objc-property-declaration] New option IncludeDefaultAcronyms

2018-01-22 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE323130: [clang-tidy objc-property-declaration] New option IncludeDefaultAcronyms (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D42261?vs=130661&id=130899#

[PATCH] D42261: [clang-tidy objc-property-declaration] New option IncludeDefaultAcronyms

2018-01-22 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323130: [clang-tidy objc-property-declaration] New option IncludeDefaultAcronyms (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revie

[PATCH] D42261: [clang-tidy objc-property-declaration] New option IncludeDefaultAcronyms

2018-01-19 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 130661. benhamilton added a comment. - Remove debugging code Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42261 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp clang-tidy/objc/PropertyDeclarationCheck.h docs/clang-tidy/check

[PATCH] D42261: [clang-tidy objc-property-declaration] New option AdditionalAcronyms

2018-01-19 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Thanks, fixed. Comment at: clang-tidy/objc/PropertyDeclarationCheck.h:38 const std::vector SpecialAcronyms; +const std::vector AdditionalAcronyms; }; hokein wrote: > nit: code indent Ah, the previous one was wrong, I see.

[PATCH] D42261: [clang-tidy objc-property-declaration] New option AdditionalAcronyms

2018-01-19 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 130657. benhamilton marked 2 inline comments as done. benhamilton added a comment. - Switch to IncludeDefaultAcronyms option (defaults to 1). - Use array for default acronyms, since we no longer need to parse it. - Don't regex-escape default acronyms, sinc

[PATCH] D42253: [clang-tidy objc-property-declaration] Expand list of ObjC acronyms

2018-01-18 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322886: [clang-tidy objc-property-declaration] Expand list of ObjC acronyms (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.o

[PATCH] D42253: [clang-tidy objc-property-declaration] Expand list of ObjC acronyms

2018-01-18 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE322886: [clang-tidy objc-property-declaration] Expand list of ObjC acronyms (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D42253?vs=130478&id=130480#toc

[PATCH] D42261: [clang-tidy objc-property-declaration] New option AdditionalAcronyms

2018-01-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: Wizard, hokein, klimek. Herald added a subscriber: cfe-commits. The existing option objc-property-declaration.Acronyms replaces the built-in set of acronyms. While this behavior is OK for clients that don't want the default behavior,

[PATCH] D42253: [clang-tidy objc-property-declaration] Expand list of ObjC acronyms

2018-01-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 130478. benhamilton added a comment. - Added comment about prefixes and suffixes. - Updated list of acronyms. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42253 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp docs/clang-tidy/c

[PATCH] D42253: [clang-tidy objc-property-declaration] Expand list of ObjC acronyms

2018-01-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: Wizard, hokein, klimek. Herald added a subscriber: cfe-commits. We were missing some pretty common acronyms in the camelCase property name check objc-property-declaration. This expands the list and sorts it lexicographically, so we c

[PATCH] D41074: [ClangFormat] ObjCSpaceBeforeProtocolList should be true in the google style

2018-01-18 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322873: [ClangFormat] ObjCSpaceBeforeProtocolList should be true in the google style (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D41074?vs=126806&id=13044

[PATCH] D42189: [clang-format] Replace unordered_set with an array

2018-01-17 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, this is smarter. Repository: rC Clang https://reviews.llvm.org/D42189 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D42189: [clang-format] Replace unordered_set with an array

2018-01-17 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/Format.cpp:1424 const AdditionalKeywords &Keywords) { -static const std::unordered_set FoundationIdentifiers = { +static constexpr llvm::StringLiteral FoundationIdentifiers[] = {

[PATCH] D42135: [Format] Improve ObjC header guessing heuristic

2018-01-17 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322690: [Format] Improve ObjC header guessing heuristic (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D42135 Files:

[PATCH] D42135: [Format] Improve ObjC header guessing heuristic

2018-01-17 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 130202. benhamilton added a comment. Use unordered_set, consolidate at-token checks Repository: rC Clang https://reviews.llvm.org/D42135 Files: lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp

[PATCH] D42135: [Format] Improve ObjC header guessing heuristic

2018-01-17 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 130192. benhamilton added a comment. - Remove unused variable. Repository: rC Clang https://reviews.llvm.org/D42135 Files: lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp =

[PATCH] D41074: [ClangFormat] ObjCSpaceBeforeProtocolList should be true in the google style

2018-01-17 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Any way we can get an accept on this one? Repository: rC Clang https://reviews.llvm.org/D41074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42135: [Format] Improve ObjC header guessing heuristic

2018-01-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 130044. benhamilton added a comment. - Last cleanup for tests Repository: rC Clang https://reviews.llvm.org/D42135 Files: lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp ==

[PATCH] D42135: [Format] Improve ObjC header guessing heuristic

2018-01-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 130042. benhamilton added a comment. - Tidy up Repository: rC Clang https://reviews.llvm.org/D42135 Files: lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp =

[PATCH] D42135: [Format] Improve ObjC header guessing heuristic

2018-01-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 130041. benhamilton added a comment. - Move tests to FormatTestObjC.cpp Repository: rC Clang https://reviews.llvm.org/D42135 Files: lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp

[PATCH] D42135: [Format] Improve ObjC header guessing heuristic

2018-01-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: jolesiak, krasimir. Herald added subscribers: cfe-commits, klimek. This improves upon the previous Objective-C header guessing heuristic from https://reviews.llvm.org/rC320479. Now, we run the lexer on C++ header files and look for O

[PATCH] D41918: [libunwind] Set up .arcconfig to point to new Diffusion UNW repository

2018-01-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. Too funny. I'll abandon https://reviews.llvm.org/D41917. Repository: rUNW libunwind https://reviews.llvm.org/D41918 ___ cfe-commits

[PATCH] D41789: [clang-tidy] Function-scoped static variables should not trigger google-objc-global-variable-declaration

2018-01-05 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE321914: [clang-tidy] Function-scoped static variables should not trigger google-objc… (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D41789?vs=128814&id=12

[PATCH] D41789: [clang-tidy] Function-scoped static variables should not trigger google-objc-global-variable-declaration

2018-01-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: Wizard, hokein, klimek. Herald added subscribers: cfe-commits, xazax.hun. google-objc-global-variable-declaration currently triggers on valid code like: - (void)foo { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ /*

[PATCH] D41195: [ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style

2017-12-14 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320714: [ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D41195?vs=126969&id=1

[PATCH] D41195: [ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style

2017-12-14 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 126969. benhamilton marked an inline comment as done. benhamilton added a comment. - Use 40 column limit for test. Repository: rC Clang https://reviews.llvm.org/D41195 Files: lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index: unit

[PATCH] D41195: [ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style

2017-12-14 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:388 + // Wrapped method parameters should be indented. + verifyFormat("- (VeryLongReturnTypeName)\n" + "veryLongMethodParameter:(VeryLongParameterName)" djasper

[PATCH] D41195: [ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style

2017-12-13 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: krasimir, djasper, klimek. Herald added a subscriber: cfe-commits. If we write the following code, it goes over 100 columns, so we need to wrap it: - (VeryLongReturnTypeName)veryLongMethodParameter:(VeryLongParameterName)thisIsAVery

[PATCH] D41074: [ClangFormat] ObjCSpaceBeforeProtocolList should be true in the google style

2017-12-13 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 126806. benhamilton added a comment. Herald added a subscriber: klimek. Rebase Repository: rC Clang https://reviews.llvm.org/D41074 Files: lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp

[PATCH] D41074: [ClangFormat] ObjCSpaceBeforeProtocolList should be true in the google style

2017-12-11 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. Herald added a subscriber: cfe-commits. The Google style guide is neutral on whether there should be a space before the protocol list in an Objective-C @interface or @implementation. The majority of Objective-C code in both Apple's public header files and Google

[PATCH] D40501: [libcxxabi] Set up .arcconfig to point to new Diffusion CXXA repository

2017-12-04 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL319713: [libcxxabi] Set up .arcconfig to point to new Diffusion CXXA repository (authored by benhamilton). Repository: rL LLVM https://reviews.llvm.org/D40501 Files: libcxxabi/trunk/.arcconfig Ind

[PATCH] D40500: [libcxx] Set up .arcconfig to point to new Diffusion CXX repository

2017-12-04 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL319666: [libcxx] Set up .arcconfig to point to new Diffusion CXX repository (authored by benhamilton). Repository: rL LLVM https://reviews.llvm.org/D40500 Files: libcxx/trunk/.arcconfig Index: lib

[PATCH] D40325: add new check to find OSSpinlock usage

2017-11-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: test/clang-tidy/objc-avoid-spinlock.m:4 +typedef int OSSpinLock; +void OSSpinlockTry(OSSpinLock *__lock) {} + Wizard wrote: > benhamilton wrote: > > Not sure why you declared (and defined?) this one but not the other

[PATCH] D40325: add new check to find OSSpinlock usage

2017-11-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Thanks, looks good. Just one question about the test. Comment at: test/clang-tidy/objc-avoid-spinlock.m:4 +typedef int OSSpinLock; +void OSSpinlockTry(OSSpinLock *__lock) {} + Not sure why you declared (and defined?) this one but no

[PATCH] D40325: add new check to find OSSpinlock usage

2017-11-27 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-tidy/objc/AvoidSpinlockCheck.cpp:31-32 + diag(MatchedExpr->getLocStart(), + "deprecated usage of OSSpinlock; Please use other locks or

[PATCH] D40325: add new check to find OSSpinlock usage

2017-11-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/objc/AvoidSpinlockCheck.cpp:22-24 + if (!getLangOpts().ObjC1 && !getLangOpts().ObjC2) { +return; + } Why? `OSSpinLock()` calls should also be avoided in C++. I think you should remove this. =

[PATCH] D40501: [libcxxabi] Set up .arcconfig to point to new Diffusion CXXA repository

2017-11-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. Herald added a subscriber: cfe-commits. We want to automatically copy the appropriate mailing list for review requests to the libc++abi repository. For context, see the proposal and discussion here: http://lists.llvm.org/pipermail/cfe-dev/2017-November/056032.h

[PATCH] D40500: [libcxx] Set up .arcconfig to point to new Diffusion CXX repository

2017-11-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. Herald added a subscriber: cfe-commits. We want to automatically copy the appropriate mailing list for review requests to the libc++ repository. For context, see the proposal and discussion here: http://lists.llvm.org/pipermail/cfe-dev/2017-November/056032.html

[PATCH] D40494: [clang] Set up .arcconfig to point to new Diffusion C repository

2017-11-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. We want to automatically copy cfe-commits@ on review requests to the clang repository. Similar to https://reviews.llvm.org/D40179, I set up a new Diffusion repository with callsign "C" for clang: https://reviews.llvm.org/source/clang/ This explicitly updates

[PATCH] D40180: [clang-tools-extra] Fix small typo in docs/ReleaseNotes.rst

2017-11-17 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. This is mainly a test diff to check the new Herald rule I added in LLVM Phabricator to automatically Cc: cfe-commits on all clang-tools-extra diffs. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40180 Files: docs/ReleaseNotes.rst Index: d

[PATCH] D40140: [VirtualFileSystem] Support creating directories then adding files inside

2017-11-16 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318445: [VirtualFileSystem] Support creating directories then adding files inside (authored by benhamilton). Repository: rL LLVM https://reviews.llvm.org/D40140 Files: cfe/trunk/include/clang/Basic/

[PATCH] D40140: [VirtualFileSystem] Support creating directories then adding files inside

2017-11-16 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 123221. benhamilton added a comment. - Fix style. https://reviews.llvm.org/D40140 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp Index: unittests/Basic/VirtualFileSystemTe

[PATCH] D40058: add check to avoid throwing objc exception according to Google Objective-C guide

2017-11-15 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. LGTM https://reviews.llvm.org/D40058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40058: add check to avoid throwing objc exception according to Google Objective-C guide

2017-11-15 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. File names look good now, thanks. Comment at: clang-tidy/google/AvoidThrowingObjCExceptionCheck.cpp:1 +//===--- AvoidThrowingObjcExceptionCheck.cpp - clang-tidy--===// +// Objc -> ObjC https://reviews.llvm.org/D4

[PATCH] D40058: add check to avoid throwing objc exception according to Google Objective-C guide

2017-11-15 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/google/AvoidThrowingObjcExceptionCheck.h:1 +//===--- AvoidThrowingObjCExceptionCheck.h - clang-tidy--*- C++ -*-===// +// benhamilton wrote: > Don't forget to rename the file to AvoidThrowingObjcEx

[PATCH] D40058: add check to avoid throwing objc exception according to Google Objective-C guide

2017-11-15 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: test/clang-tidy/google-objc-avoid-throwing-exception.m:17-20 +- (void)f2 { +[NSException raise:@"TestException" format:@"Test"]; +// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: pass in NSError ** instead of throwing exception

[PATCH] D40058: add check to avoid throwing objc exception according to Google Objective-C guide

2017-11-15 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. Looking good. Please rename the files correctly, or it will not build on Linux. Comment at: clang-tidy/google/AvoidThrowingObjcExceptionCheck.cpp:23 + Finder->addM

[PATCH] D40058: add check to avoid throwing objc exception according to Google Objective-C guide

2017-11-15 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. Almost there. Comment at: clang-tidy/google/AvoidThrowingObjcExceptionCheck.cpp:22 +void AvoidThrowingObjcExceptionCheck::registerMatchers(MatchFinder *Fi

[PATCH] D39829: add new check for property declaration

2017-11-13 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318117: add new check for property declaration (authored by benhamilton). Repository: rL LLVM https://reviews.llvm.org/D39829 Files: clang-tools-extra/trunk/clang-tidy/objc/CMakeLists.txt clang-to

[PATCH] D39829: add new check for property declaration

2017-11-13 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. OK, I updated this diff with the suggested changes. @Wizard, want to take a look before I land? https://reviews.llvm.org/D39829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D39829: add new check for property declaration

2017-11-13 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 122739. benhamilton added a comment. - Use regex to match acronym prefixes, update tests https://reviews.llvm.org/D39829 Files: clang-tidy/objc/CMakeLists.txt clang-tidy/objc/ObjCTidyModule.cpp clang-tidy/objc/PropertyDeclarationCheck.cpp clang-

[PATCH] D39829: add new check for property declaration

2017-11-13 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:89 + assert(MatchedDecl->getName().size() > 0); + // Skip the check of lowerCamelCase if the name has prefix of special acronyms + if (startsWithSpecialAcronyms(MatchedDecl->getName(),

[PATCH] D39829: add new check for property declaration

2017-11-10 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:41 + objcPropertyDecl( + // the property name should be in Lower Camel Case like + // 'lowerCamelCase' benhamilton wrote: > There are some exception

[PATCH] D39829: add new check for property declaration

2017-11-10 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:41 + objcPropertyDecl( + // the property name should be in Lower Camel Case like + // 'lowerCamelCase' There are some exceptions we should special c

[PATCH] D39829: add new check for property declaration

2017-11-09 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:25 +/// we will do best effort to generate a fix, however, if the +/// case can not be solved with a simple fix (e.g. remove prefix or change first +/// character), we will leave the fix

[PATCH] D39829: add new check for property declaration

2017-11-09 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: docs/clang-tidy/checks/objc-property-declaration.rst:7 +Finds property declarations in Objective-C files that do not follow the pattern +of property names in Google's Objective-C Style Guide. The property name should +be in the forma

<    1   2   3   4