[cfe-commits] r49107 - in /cfe/trunk: include/clang/AST/Decl.h include/clang/AST/DeclObjC.h include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h lib/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclObjC.cpp test/Sema/check-dup-objc-decls-1.m

Fariborz Jahanian fjahanian at apple.com
Wed Apr 2 14:30:21 PDT 2008


On Apr 2, 2008, at 1:54 PM, Steve Naroff wrote:

>
> On Apr 2, 2008, at 1:53 PM, Fariborz Jahanian wrote:
>
>>
>> On Apr 2, 2008, at 1:43 PM, Steve Naroff wrote:
>>
>>>
>>> On Apr 2, 2008, at 1:35 PM, Fariborz Jahanian wrote:
>>>
>>>>
>>>> On Apr 2, 2008, at 11:30 AM, Steve Naroff wrote:
>>>>
>>>>> Author: snaroff
>>>>> Date: Wed Apr  2 13:30:49 2008
>>>>> New Revision: 49107
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=49107&view=rev
>>>>> Log:
>>>>> Change ObjCInterfaceDecl to inherit from NamedDecl (not  
>>>>> TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it  
>>>>> isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense  
>>>>> to simply treat
>>>>
>>>> Can't it  be a TypeDecl of a ScopedDecl of the global scope ?
>>>>
>>>
>>> I don't understand your question. Can you elaborate?
>>
>> If I read you comment correctly, you said that ObjCInterfaceDecl  
>> cannot be derived from TypeDecl because it isn't a ScopedDecl.
>
> TypeDecl derives from ScopeDecl. That said, it doesn't make much  
> sense for ObjCInterfaceDecl to inherit from TypeDecl (since it isn't  
> scoped).

I am not sure what you mean by it is not scoped. an Interface belongs  
to global scope. So, it is scoped.
So, in obj-c++, you can say:

@interface I @end
::I *pi;

- Fariborz

>



More information about the cfe-commits mailing list