[PATCH] D137740: [clang-tidy][NFC] Fix namespace comments in AvoidThrowingObjCExceptionCheck.cpp 粒

2023-03-30 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore abandoned this revision. stephanemoore added a comment. Abandoned this revision and folded the changes into another revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137740/new/ https://reviews.llvm.org/D137740

[PATCH] D137738: [clang-tidy] Suppress google-objc-avoid-throwing-exception in system macros 﫢

2022-11-30 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6c2140943cbe: [clang-tidy] Suppress google-objc-avoid-throwing-exception in system macros 﫢 (authored by stephanemoore). Changed prior to commit: https://reviews.llvm.org/D137738?vs=475222=479104#toc

[PATCH] D137738: [clang-tidy] Suppress google-objc-avoid-throwing-exception in system macros 﫢

2022-11-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. The false positives from this check are causing some disruption for XCTest framework users after some changes that we believe happened in Xcode 14. It would be nice if we could land some form of fix soon. I am happy to discuss options and iterate as needed.

[PATCH] D137738: [clang-tidy] Suppress google-objc-avoid-throwing-exception in system macros 﫢

2022-11-14 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 475222. stephanemoore added a subscriber: Eugene.Zelenko. stephanemoore added a comment. Included namespace comment linter fixes from D137740 as advised by @Eugene.Zelenko, Repository: rG LLVM Github Monorepo

[PATCH] D137740: [clang-tidy][NFC] Fix namespace comments in AvoidThrowingObjCExceptionCheck.cpp 粒

2022-11-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In D137740#3918271 , @Eugene.Zelenko wrote: > Will be good idea to combine this patch with D137738 > . My intent was to land the simpler linter fixes first while iterating on the fixes

[PATCH] D137738: [clang-tidy] Suppress google-objc-avoid-throwing-exception in system macros 﫢

2022-11-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. stephanemoore updated this revision to Diff 474350. stephanemoore added a comment. stephanemoore updated this revision to Diff 474356.

[PATCH] D137740: [clang-tidy] Fix namespace comments in AvoidThrowingObjCExceptionCheck.cpp 粒

2022-11-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. stephanemoore published this revision for review. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. This commit

[PATCH] D135091: Create storage for the `_cmd` argument to the helper function for generated getters/setters of `direct` Objective-C properties.

2022-10-06 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1194-1196 + // emitted for it to be passed to the property helper. Since the `_cmd` + // argument was never being initialized by the caller before, still

[PATCH] D135091: Load the `_cmd` selector for generated getters/setters of `direct` Objective-C properties.

2022-10-06 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/CodeGen/CGObjC.cpp:1189-1191 // Return (ivar-type) objc_getProperty((id) self, _cmd, offset, true). // FIXME: Can't this be

[PATCH] D131424: Remove the unused/undefined _cmd parameter to objc_direct methods.

2022-10-06 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. LGTM after fixing the assertion ✅ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131424/new/ https://reviews.llvm.org/D131424 ___ cfe-commits mailing list

[PATCH] D120372: [clang] 'unused-but-set-variable' warning should not apply to __attribute__((objc_precise_lifetime) Objective-C pointers

2022-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Maybe ahatanak might be a good reviewer based on https://reviews.llvm.org/D112850? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120372/new/ https://reviews.llvm.org/D120372

[PATCH] D120372: [clang] 'unused-but-set-variable' warning should not apply to __attribute__((objc_precise_lifetime) Objective-C pointers

2022-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added a comment. This revision is now accepted and ready to land. Make sense to me. I don't know offhand who might be a good second pair of eyes to take a look. Comment at:

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

2020-04-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/objc-nsinvocation-argument-lifetime.m:64-69 +- (void)processInvocation:(NSInvocation *)Invocation { + [Invocation getArgument: atIndex:2]; + //

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

2020-04-08 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore marked an inline comment as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/NSInvocationArgumentLifetimeCheck.cpp:49 + QT->getScalarTypeKind() == Type::STK_BlockPointer) && +

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

2020-02-06 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added a comment. This revision is now accepted and ready to land. Looks good! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72876/new/ https://reviews.llvm.org/D72876

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

2020-01-31 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore added a comment. This revision now requires changes to proceed. One last correction and I think that you're all set! Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:284

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

2020-01-29 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Looks in good shape  A couple nits and polish ideas. Comment at: clang-tools-extra/clang-tidy/objc/DeallocInCategoryCheck.cpp:34 + +void DeallocInCategoryCheck::check(const MatchFinder::MatchResult ) { + const auto *MatchedDecl =

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

2020-01-24 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/DeallocInCategoriesCheck.cpp:19 + +void DeallocInCategoriesCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( Early return if the language is not an Objective-C

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

2020-01-24 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-tidy/objc/DeallocInCategoriesCheck.cpp:21 + Finder->addMatcher( + objcMethodDecl(hasName("dealloc"),

[PATCH] D69414: [clang-tidy] Regenerate clang-tidy check list 

2019-10-30 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9baf4958cda4: [clang-tidy] Regenerate clang-tidy check list  (authored by stephanemoore). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69414/new/

[PATCH] D69414: [clang-tidy] Regenerate clang-tidy check list 

2019-10-24 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Please let me know if there are any corrections that are required to the output of `clang-tools-extra/clang-tidy/add_new_check.py`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69414/new/

[PATCH] D69414: [clang-tidy] Regenerate clang-tidy check list 

2019-10-24 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. stephanemoore added a reviewer: aaron.ballman. stephanemoore added a comment. Please let me know if there are any corrections that are required to the output of

[PATCH] D68148: [clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock

2019-10-01 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373392: [clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock (authored by stephanemoore, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-30 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. (sorry for the delay ) > The difference is that the exemption list would be per-project, created by > whoever turns on the check for the project. I was assuming that this checker > would be turned on by each team, rather than globally, and that part of doing >

[PATCH] D68148: [clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock

2019-09-29 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added a comment. This revision is now accepted and ready to land. I wasn't sure what the policy is for renaming checks so I dug into previous check renames. https://reviews.llvm.org/D43867 seems to indicate that it's acceptable for checks to

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

2019-09-26 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373028: [clang-tidy] New check to warn when storing dispatch_once_t in non-static, non… (authored by stephanemoore, committed by ). Herald added subscribers: llvm-commits, ilya-biryukov. Herald added a

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

2019-09-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. It looks like everything is in order. I will proceed with landing the patch on your behalf  CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67567/new/ https://reviews.llvm.org/D67567 ___ cfe-commits mailing

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

2019-09-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. > Does the check allow variables in anonymous namespaces? > > namespace { > dispatch_once_t onceToken; > } > > > I //think// such variables should satisfy initialization requirements. > > If not, can we update the check to not trigger on variables? Either

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

2019-09-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Looks good! A couple nits/questions. Does the check allow variables in anonymous namespaces? namespace { dispatch_once_t onceToken; } I //think// such variables should satisfy initialization requirements. If not, can we update the check to not trigger on

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-20 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. stephanemoore marked an inline comment as done. Closed by commit rL372445: [clang-tidy] Add check for classes missing -hash ⚠️ (authored by stephanemoore, committed by ). Herald added a project: LLVM. Herald added a

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-20 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 2 inline comments as done. stephanemoore added a comment. Thanks for the review! Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:56 + const auto *ID = Result.Nodes.getNodeAs("impl"); + diag(ID->getLocation(), "%0 implements -isEqual:

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-20 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-tidy/google/RequireCategoryMethodPrefixesCheck.cpp:23 + Finder->addMatcher(objcMethodDecl(hasDeclContext( +

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-19 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 3 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:56 + const auto *ID = Result.Nodes.getNodeAs("impl"); + diag(ID->getLocation(), "%0 implements -isEqual: without implementing

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-19 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 4 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:40 +void MissingHashCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( + objcMethodDecl(

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-19 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 220823. stephanemoore added a comment. Restrict ojbc-missing-hash to Objective-C language variants and fix sorting of release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67737/new/

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-18 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. Apple documentation states that: "If two objects are equal, they must have the same hash value. This last point is particularly important if you define isEqual: in a

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-17 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/google-objc-require-category-method-prefixes.rst:41 + +.. option:: ExpectedPrefixes + aaron.ballman wrote: > stephanemoore wrote: > > This option seems to describe a list

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-16 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-tidy/google/RequireCategoryMethodPrefixesCheck.cpp:23 + Finder->addMatcher(objcMethodDecl(hasDeclContext( +

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

2019-09-16 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In D67567#1670144 , @mwyman wrote: > In D67567#1670035 , @lebedev.ri > wrote: > > > In D67567#1670017 , @mwyman wrote: > > > > > In

[PATCH] D67578: [clang-tidy] New check to warn when writing to a dispatch_once_t variable.

2019-09-16 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-dispatch-once-assignment.rst:9 +and making such direct writes may potentially violate the run-once protections +intended by the library. Eugene.Zelenko wrote: > Does

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-11 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore marked an inline comment as done. stephanemoore added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-tidy/google/RequireCategoryMethodPrefixesCheck.cpp:30 +

[PATCH] D66270: [clang-tidy] Migrate objc-super-self to use isDerivedFrom 

2019-08-15 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369081: [clang-tidy] Migrate objc-super-self to use isDerivedFrom  (authored by stephanemoore, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D66269: [clang-tidy] Migrate objc-forbidden-subclassing to use isDerivedFrom 

2019-08-15 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369076: [clang-tidy] Migrate objc-forbidden-subclassing to use isDerivedFrom  (authored by stephanemoore, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D66270: [clang-tidy] Migrate objc-super-self to use isDerivedFrom 

2019-08-14 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 215311. stephanemoore added a comment. Fix example matches in comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66270/new/ https://reviews.llvm.org/D66270 Files:

[PATCH] D66270: [clang-tidy] Migrate objc-super-self to use isDerivedFrom 

2019-08-14 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. stephanemoore added reviewers: aaron.ballman, gribozavr. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. This migrates objc-super-self to `isDerivedFrom` as it now supports matching Objective-C interface declarations. Test

[PATCH] D66269: [clang-tidy] Migrate objc-forbidden-subclassing to use isDerivedFrom 

2019-08-14 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. This migrates objc-forbidden-subclassing to `isDerivedFrom` as it now supports matching Objective-C interface declarations. Test Notes: Ran clang tools tests. Repository: rG

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-08-12 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. stephanemoore marked an inline comment as done. Closed by commit rL368632: [clang] Update isDerivedFrom to support Objective-C classes  (authored by stephanemoore, committed by ). Herald added a project: LLVM. Herald added

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-08-08 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 3 inline comments as done. stephanemoore added inline comments. Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:820 + llvm::DenseMap> + CompatibleAliases; aaron.ballman wrote: > gribozavr wrote: > > `unordered_set`? > or

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-08-08 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 214272. stephanemoore added a comment. Use `llvm::SmallPtrSet` to store the compatible aliases instead of `std::set`. Fix a stray unit test failure in `RegistryTest.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-08-07 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 214053. stephanemoore added a comment. Add tests for `isDirectlyDerivedFrom`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60543/new/ https://reviews.llvm.org/D60543 Files:

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-08-07 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore planned changes to this revision. stephanemoore added a comment. Whoops; forgot to add test cases for `isDirectlyDerivedFrom` 臘 Will do that shortly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60543/new/

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-08-07 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. I spent some time becoming familiar with how `isDerivedFrom` behaves for C++ classes. I //think// that I have managed to get the behavior for Objective-C classes to mirror that of C++ classes. Please let me know if I overlooked anything.

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-08-07 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 214035. stephanemoore marked 6 inline comments as done. stephanemoore edited the summary of this revision. stephanemoore added a comment. Update `isDerivedFrom` to match aliased types and compatibility aliases of derived Objective-C classes.

[PATCH] D62045: Revise the google-objc-global-variable-declaration check to match the style guide.

2019-05-31 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362279: Revise the google-objc-global-variable-declaration check to match the style… (authored by stephanemoore, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D62045: Revise the google-objc-global-variable-declaration check to match the style guide.

2019-05-29 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore marked an inline comment as done. stephanemoore added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/test/clang-tidy/google-objc-global-variable-declaration.m:46 +//

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-05-28 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore planned changes to this revision. stephanemoore added a comment. Thanks for the input! I will get started on making changes accordingly. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2642-2649 + if (const auto *InterfaceDecl = dyn_cast()) { +//

[PATCH] D62045: Revise the google-objc-global-variable-declaration check to match the style guide.

2019-05-28 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore reopened this revision. stephanemoore added inline comments. This revision is now accepted and ready to land. Comment at: test/clang-tidy/google-objc-global-variable-declaration.m:48 static NSString* gMyIntGood = 0; +extern NSString* Y2Good;

[PATCH] D62045: Revise the google-objc-global-variable-declaration check to match the style guide.

2019-05-28 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE361907: Revise the google-objc-global-variable-declaration check to match the style… (authored by stephanemoore, committed by ). Changed prior to commit:

[PATCH] D62045: Revise the google-objc-global-variable-declaration check to match the style guide.

2019-05-28 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. It looks like all concerns have been addressed. Do you need me to land this commit for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62045/new/ https://reviews.llvm.org/D62045

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-05-24 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added a comment. This revision is now accepted and ready to land. Okay I now have an implementation of Option 2 that //works//. I was hoping to find a more elegant solution but since this is the first working implementation of Option 2 I was

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-05-24 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 201385. stephanemoore marked an inline comment as done. stephanemoore added a comment. Add missing braces to multi-line if statements. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60543/new/

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-05-24 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 201384. stephanemoore added a comment. Update isDerivedFrom and related matchers to polymorphic matchers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60543/new/ https://reviews.llvm.org/D60543 Files:

[PATCH] D62045: Revise the google-objc-global-variable-declaration check to match the style guide.

2019-05-24 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added a comment. Looks good! Thanks for being patient with me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62045/new/ https://reviews.llvm.org/D62045

[PATCH] D62045: Revise the google-objc-global-variable-declaration check to match the style guide.

2019-05-24 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore marked 2 inline comments as done. stephanemoore added a comment. (sorry I forgot to send this earlier) Two small things and then I think everything is good. Comment at:

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-05-21 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore planned changes to this revision. stephanemoore added a comment. > Out of curiosity, how invasive is Option 2 within our own code base? I am still working on getting something working but I don't anticipate anything notably invasive. > Does that option require fixing a lot of

[PATCH] D62045: Do not emit fixes for extern global constants in google-objc-global-variable-declaration check.

2019-05-21 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore added a comment. This revision now requires changes to proceed. Many thanks for being patient with me  I think there are just two more things ✌️ ❧ Sorry, I think my earlier description was understated. Maybe this would be a

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

2019-05-21 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore added a comment. This revision now requires changes to proceed. Almost there. I think everything looks good after we resolve this last round of comments. Can you also update the commit description. I believe that the current

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

2019-05-17 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/google/GlobalVariableDeclarationCheck.cpp:45 + + auto NewName = (IsConst? "k": "g") + llvm::StringRef(std::string(1, FC)).upper()) + + Decl->getName().substr(1).str());

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

2019-05-17 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore added a comment. This revision now requires changes to proceed. Thanks for restoring the support for the legacy style! I noticed that there are some cases where we can preserve an existing fixit. Comment at:

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

2019-05-17 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore marked 4 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/google/GlobalVariableDeclarationCheck.cpp:51-52 + + auto NewName = "g" +

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-14 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore marked an inline comment as done. stephanemoore added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp:54 +CheckFactories.registerCheck(

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-13 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore marked an inline comment as done. stephanemoore added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:112 +

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-13 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added a comment. I believe that all the feedback from @gribozavr has been addressed modulo one small nit. Once that nit has been addressed, I can land this. Comment at:

[PATCH] D61769: [clang] Regenerate AST matcher docs 

2019-05-12 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360545: [clang] Regenerate AST matcher docs  (authored by stephanemoore, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-05-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:566 + notMatchesObjC("@interface Y @end typedef Y X; @interface Z : X @end", + ZIsDerivedFromX)); + EXPECT_TRUE( (note that there are

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-05-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. I did some digging and I believe there are two approaches that we can take to extend `isDerivedFrom` to support Objective-C classes. **Option 1: Match on Common Ancestor Declaration Type**: Convert `isDerivedFrom` to match on the common ancestor declaration type,

[PATCH] D60543: [clang] Add matcher for subclasses of Objective-C interfaces 

2019-05-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 198956. stephanemoore added a comment. Present one potential option for making isDerivedFrom support Objective-C classes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60543/new/

[PATCH] D61769: [clang] Regenerate AST matcher docs 

2019-05-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The documentation seems to have been manually edited in https://reviews.llvm.org/rGa282bde69e375985edd4c371b79864f617380ad5. This commit regenerates the documentation and commits the

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-07 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added a comment. Looks good to me once the comments from other reviewers have been addressed. I added a couple suggestions as well. Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:112 +

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-17 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL358620: [clang-tidy] Add a check for [super self] in initializers  (authored by stephanemoore, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-16 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In D59806#1469257 , @aaron.ballman wrote: > LGTM! You can either land this now and refactor after the AST matcher lands, > or you can wait until the AST matcher lands and land this patch after -- your > call. I will

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-15 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:57 +/// \endcode +AST_MATCHER_P(ObjCImplementationDecl, isSubclassOf, + ast_matchers::internal::Matcher, stephanemoore wrote: > aaron.ballman

[PATCH] D60543: [clang] Add matcher for subclasses of Objective-C interfaces 

2019-04-15 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore planned changes to this revision. stephanemoore added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:1479 +/// \endcode +AST_MATCHER_P(ObjCInterfaceDecl, isSubclassOfInterface, + internal::Matcher,

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-12 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 194998. stephanemoore added a comment. Fix some formatting issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59806/new/ https://reviews.llvm.org/D59806 Files:

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-12 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 194997. stephanemoore marked 4 inline comments as done. stephanemoore added a comment. Check if either the receiver or selector are in macro locations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-12 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 194996. stephanemoore marked 3 inline comments as done. stephanemoore added a comment. Add `CHECK-FIXES` to verify code is preserved for scenarios that should not have fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-12 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 194995. stephanemoore added a comment. Update check to avoid emitting a fix if the expression is in a macro. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59806/new/ https://reviews.llvm.org/D59806

[PATCH] D60543: [clang] Add matcher for subclasses of Objective-C interfaces 

2019-04-10 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked an inline comment as done. stephanemoore added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:1479 +/// \endcode +AST_MATCHER_P(ObjCInterfaceDecl, isSubclassOfInterface, + internal::Matcher, I am

[PATCH] D60543: [clang] Add matcher for subclasses of Objective-C interfaces 

2019-04-10 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. stephanemoore added a reviewer: aaron.ballman. This change adds a new AST matcher to detect Objective-C classes that are subclasses of matching Objective-C interfaces. Test Notes: Ran

[PATCH] D60263: [clang-format] Preserve include blocks in ObjC Google style

2019-04-10 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Looks good to me. Comment at: cfe/trunk/lib/Format/Format.cpp:881 +// "Regroup" doesn't work well for ObjC yet (main header heuristic, +// relationship between ObjC standard library headers and other heades, +// #imports, etc.)

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-04 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore planned changes to this revision. stephanemoore marked an inline comment as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:112 + << Message->getMethodDecl() + <<

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-02 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:112 + << Message->getMethodDecl() + << FixItHint::CreateReplacement(Message->getSourceRange(), + StringRef("[super init]"));

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-04-02 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 193340. stephanemoore marked an inline comment as done. stephanemoore added a comment. Add a test case where a macro emits just `self` in the message expression. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-29 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 3 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:112 + << Message->getMethodDecl() + << FixItHint::CreateReplacement(Message->getSourceRange(), +

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-29 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 192938. stephanemoore added a comment. Add test cases with `[super self]` expanded from macros. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59806/new/ https://reviews.llvm.org/D59806 Files:

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-29 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In D59806#1447929 , @jordan_rose wrote: > I don't think there's ever a reason to call `[super self]`, and doing so > through a macro could easily indicate a bug. Agreed. The only relatively common usage of -[NSObject

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 192383. stephanemoore added a comment. Update tests to match updated diagnostic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59806/new/ https://reviews.llvm.org/D59806 Files:

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 2 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:110 + "invoke a superclass initializer?") + << Message->getMethodDecl() + <<

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 2 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:113 + + Finds invocations of `-self` on super instances in initializers of subclasses + of `NSObject` and recommends calling a superclass

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 192373. stephanemoore added a comment. Use double backticks rather than single backticks for symbols in documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59806/new/

  1   2   3   >