Do not enter forward class 'Protocol' in decl context.

Will do it later. Fixes pr5552.

llvm-svn: 89269
This commit is contained in:
Fariborz Jahanian 2009-11-18 23:15:37 +00:00
parent 6a96bf7d6e
commit 1e3609f6c4
2 changed files with 7 additions and 1 deletions

View File

@ -319,7 +319,7 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) {
&Context.Idents.get("Protocol"),
SourceLocation(), true);
Context.setObjCProtoType(Context.getObjCInterfaceType(ProtocolDecl));
PushOnScopeChains(ProtocolDecl, TUScope);
PushOnScopeChains(ProtocolDecl, TUScope, false);
}
// Create the built-in typedef for 'id'.
if (Context.getObjCIdType().isNull()) {

View File

@ -0,0 +1,6 @@
// RUN: clang-cc -fsyntax-only -verify %s
// pr5552
@interface Protocol
@end