[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

Steve Naroff snaroff at apple.com
Wed Apr 2 14:38:30 PDT 2008


On Apr 2, 2008, at 2:30 PM, Fariborz Jahanian wrote:
>
> 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;
>

A ScopedDecl is a decl that can be declared within a function/block/ 
etc. Interfaces can only be declared at file (i.e. global) scope.

Since ObjC interfaces cannot be declared within a function/block, it  
doesn't make sense for them to be a ScopedDecl. In addition, it is  
wasteful in terms of space (since the "Next" slots will never be used).

btw...do you have a problem with my code/change? Hopefully the log  
comments are clearer now...

snaroff

> - Fariborz
>
>>




More information about the cfe-commits mailing list