[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

Michael Wyman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 11:53:20 PDT 2020


mwyman updated this revision to Diff 249709.
mwyman marked 5 inline comments as done.
mwyman added a comment.

After some discussion, have decided to remove the fix-it entirely and update the diagnostic message; removing the method altogether may not be the correct behavior, as previously deprecated methods that have since been removed may want to have an unavailable attribute attached with a message explaining what to use instead, even though they don't override a superclass method.

But in general still feel like non-overriding, non-messaged attributes are probably reasonable to flag.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75569/new/

https://reviews.llvm.org/D75569

Files:
  clang-tools-extra/clang-tidy/objc/CMakeLists.txt
  clang-tools-extra/clang-tidy/objc/MethodUnavailableNotOverrideCheck.cpp
  clang-tools-extra/clang-tidy/objc/MethodUnavailableNotOverrideCheck.h
  clang-tools-extra/clang-tidy/objc/ObjCTidyModule.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/objc-method-unavailable-not-override.rst
  clang-tools-extra/test/clang-tidy/checkers/objc-method-unavailable-not-override.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75569.249709.patch
Type: text/x-patch
Size: 11069 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200311/42827d03/attachment-0001.bin>


More information about the cfe-commits mailing list