[cfe-commits] r112691 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/ASTContext.cpp lib/AST/ASTImporter.cpp lib/AST/DeclObjC.cpp lib/CodeGen/CGObjCMac.cpp lib/Sema/SemaCodeComplete.cpp lib/Sema/SemaDeclObjC.cpp lib/Sema/SemaLookup.cpp lib/Sema/SemaObjCProperty.cpp lib/Serialization/ASTReaderDecl.cpp lib/Serialization/ASTWriterDecl.cpp test/Index/local-symbols.m

Ted Kremenek kremenek at apple.com
Wed Sep 1 09:19:40 PDT 2010


Hi Fariborz,

I thought about this (after emailing you off the list), and while I agree that the naming should be better I'm not certain about using "Declared."  The protocols aren't actually declared, but are referenced.  Using "Declared" seems to conflate this concept with actual declarations.

What we are distinguishing here are "directly" and "indirectly" (or transitively) referenced protocols.

On Sep 1, 2010, at 9:02 AM, Fariborz Jahanian <fjahanian at apple.com> wrote:

> Couple of comments. Please use DeclaredProtocols (instead of ReferencedProtocols) and
> ReferencedProtocols  (instead of AllReferencedProtocols). This is more clear of the intention.
> Also, protocols are allowed on categories (as well as class extensions) but not on @implementation.
> 
> - Fariborz
> 
> On Aug 31, 2010, at 6:21 PM, Ted Kremenek wrote:
> 
>> Author: kremenek
>> Date: Tue Aug 31 20:21:15 2010
>> New Revision: 112691
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=112691&view=rev
>> Log:
>> Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols.  ReferencedProtocols
>> (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
>> an @interface declaration.  'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
>> in both the @interface and class extensions.  The latter is needed for semantic analysis/codegen, while the former is
>> needed to maintain the lexical information of the original source.
>> 
>> Fixes <rdar://problem/8380046>.
>> 



More information about the cfe-commits mailing list