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
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
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
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
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
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(
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
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
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#
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
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
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.
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
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
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
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,
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
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
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
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
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[] = {
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:
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
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
=
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
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
==
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
=
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
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
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
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
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, ^{ /*
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
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
benhamilton added inline comments.
Comment at: unittests/Format/FormatTestObjC.cpp:388
+ // Wrapped method parameters should be indented.
+ verifyFormat("- (VeryLongReturnTypeName)\n"
+ "veryLongMethodParameter:(VeryLongParameterName)"
djasper
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
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
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
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
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
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
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
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
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.
=
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
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
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
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
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/
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
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
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
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
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
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
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
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
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
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-
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(),
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
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
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
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
301 - 364 of 364 matches
Mail list logo