[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 10 11:31:41 PST 2017


arphaman created this revision.
Herald added a subscriber: javed.absar.

This patch extends the -Wavailability warning to warn about cases where a method declaration is missing an availability attribute clause that's present in the method's definition. We also warn about missing `deprecated` attributes as well.

rdar://15540962


Repository:
  rL LLVM

https://reviews.llvm.org/D39913

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/Sema.h
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaDeclAttr.cpp
  test/SemaObjC/method-attributes.m
  test/SemaObjC/unguarded-availability.m
  test/SemaObjC/warn-missing-method-decl-availability.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39913.122490.patch
Type: text/x-patch
Size: 13358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171110/144bb442/attachment-0001.bin>


More information about the cfe-commits mailing list