[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
Chris Lattner
clattner at apple.com
Thu Apr 3 15:20:03 PDT 2008
On Apr 2, 2008, at 2:30 PM, Fariborz Jahanian wrote:
>> 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 and I chatted about this. The summary is that interfaces are
implicitly at global scope, so they'll be properly resolved with name
lookup: we just won't represent them on the scope chain itself.
-Chris
More information about the cfe-commits
mailing list