]> granicus.if.org Git - clang/commit
Rework how ObjC method inherit deprecated/availability.
authorTed Kremenek <kremenek@apple.com>
Sat, 6 Apr 2013 00:34:27 +0000 (00:34 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 6 Apr 2013 00:34:27 +0000 (00:34 +0000)
commitcb3443925f967b5d51e582b39e28f67d41d73199
treed65c1811a579ca469d09bfa178f28790081d5840
parent24cac5a4847b9e4673afb9fd02701f273097f57a
Rework how ObjC method inherit deprecated/availability.

New rule:
- Method decls in @implementation are considered "redeclarations"
  and inherit deprecated/availability from the @interface.
- All other cases are consider overrides, which do not inherit
  deprecated/availability.  For example:

  (a) @interface redeclares a method in an adopted protocol.
  (b) A subclass redeclares a method in a superclass.
  (c) A protocol redeclares a method from another protocol it adopts.

The idea is that API authors should have the ability to easily
move availability/deprecated up and down a class/protocol hierarchy.
A redeclaration means that the availability/deprecation is a blank
slate.

Fixes <rdar://problem/13574571>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178937 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclAttr.cpp
test/SemaObjC/attr-availability.m
test/SemaObjC/property-deprecated-warning.m
test/SemaObjC/property-noninherited-availability-attr.m