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

2020-01-30 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 241573. mwyman marked 9 inline comments as done. mwyman added a comment. Implemented review feedback. Updated diagnostic message to mention the category name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION 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-30 Thread Michael Wyman via Phabricator via cfe-commits
mwyman added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/DeallocInCategoryCheck.cpp:34 + +void DeallocInCategoryCheck::check(const MatchFinder::MatchResult &Result) { + const auto *MatchedDecl = Result.Nodes.getNodeAs("dealloc"); stephanemoore

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

2022-02-22 Thread Michael Wyman via Phabricator via cfe-commits
mwyman created this revision. mwyman added reviewers: stephanemoore, dmaclach. mwyman added a project: clang. mwyman requested review of this revision. Herald added a subscriber: cfe-commits. The `objc_precise_lifetime` attribute is applied to Objective-C pointers to ensure the optimizer does not

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

2022-02-22 Thread Michael Wyman via Phabricator via cfe-commits
mwyman added inline comments. Comment at: clang/test/SemaObjC/objc-precise-lifetime-unused-variable.m:7 + // no diagnostics for objects with precise lifetime semantics. + __attribute__((objc_precise_lifetime)) id x; + x = getFoo(); dmaclach wrote: > what happe

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

2022-02-23 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 410863. mwyman added a comment. Added new inner scope for test file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120372/new/ https://reviews.llvm.org/D120372 Files: clang/lib/Sema/SemaDecl.cpp clang/test/SemaObjC/objc-precise-lifetime-unused-v

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

2022-02-24 Thread Michael Wyman 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 rGb682616d1fd1: Clang `unused-but-set-variable` warnings should not apply to `__attribute__… (authored by mwyman). Repository: rG LLVM Github Monore

<    1   2