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)
commit2afd661685aea4ce232ab67554f0aa3110317619
treebde7184e5319370da24637c7cb7e212527bef0fd
parent555d1c5ab8dd59b993f160993c8f9cea5b84954a
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.

llvm-svn: 166285
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/ScopeInfo.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclObjC.cpp
clang/lib/Sema/SemaExprObjC.cpp
clang/test/SemaObjC/super-dealloc-attribute.m