summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprComplex.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-11-21 07:20:42 +0000
committerTed Kremenek <kremenek@apple.com>2013-11-21 07:20:42 +0000
commit996665816b6899298ce45e684255ac813e915675 (patch)
tree8653eb43f314910135460e9d714da65aab8f245d /lib/CodeGen/CGExprComplex.cpp
parent80379e7ac0f23c933efdd9340e79d509edfe99a9 (diff)
downloadclang-996665816b6899298ce45e684255ac813e915675.tar.gz
clang-996665816b6899298ce45e684255ac813e915675.tar.bz2
clang-996665816b6899298ce45e684255ac813e915675.tar.xz
Add new attribute 'objc_suppress_protocol' to suppress protocol conformance for a class.
The idea is to allow a class to stipulate that its methods (and those of its parents) cannot be used for protocol conformance in a subclass. A subclass is then explicitly required to re-implement those methods of they are present in the class marked with this attribute. Currently the attribute can only be applied to an @interface, and not a category or class extension. This is by design. Unlike protocol conformance, where a category can add explicit conformance of a protocol to class, this anti-conformance really needs to be observed uniformly by all clients of the class. That's because the absence of the attribute implies more permissive checking of protocol conformance. This unfortunately required changing method lookup in ObjCInterfaceDecl to take an optional protocol parameter. This should not slow down method lookup in most cases, and is just used for protocol conformance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprComplex.cpp')
0 files changed, 0 insertions, 0 deletions