]> granicus.if.org Git - clang/commit
Allow objc_requires_super to be used to check class methods as well.
authorJordan Rose <jordan_rose@apple.com>
Fri, 19 Oct 2012 16:05:26 +0000 (16:05 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 19 Oct 2012 16:05:26 +0000 (16:05 +0000)
commit535a5d001b2035a7aa68ee368fbe44ec90e33740
treeaa05cd59a0b4fe30d1e672ec9cca4af97c63febf
parent266dba3661928d26f043560b169bea87578aa917
Allow objc_requires_super to be used to check class methods as well.

Also, unify ObjCShouldCallSuperDealloc and ObjCShouldCallSuperFinalize.
The two have identical behavior and will never be active at the same time.

There's one last simplification now, which is that if we see a call to
[super foo] and we are currently in a method named 'foo', we will
/unconditionally/ clear the ObjCShouldCallSuper flag, rather than check
first to see if we're in a method where calling super is required. There's
no reason to pay the extra lookup price here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166285 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/ScopeInfo.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaExprObjC.cpp
test/SemaObjC/super-dealloc-attribute.m